diff options
author | Pini Reznik <pinir@expand.com> | 2007-12-05 09:19:13 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-12-05 18:43:20 -0800 |
commit | c3d51cd16a8db417b89608a37410cf3bf8a5b137 (patch) | |
tree | 16e7e38e654ab729ef4cf70595144ded07b7eddf /git-mergetool.sh | |
parent | cec99d8cef12d18c71b277a4cd6963d37b13e901 (diff) | |
download | git-c3d51cd16a8db417b89608a37410cf3bf8a5b137.tar.gz git-c3d51cd16a8db417b89608a37410cf3bf8a5b137.tar.xz |
Open external merge tool with original file extensions for all three files
Before this change, conflicted files were open in external merge tool with
temporary filenames like REMOTE.$$ and LOCAL.$$. This way meld was unable
to recognize these files and syntax highlighting feature was unusable.
Help such merge tools by giving temporar files the same extension as the
original.
Signed-off-by: Pini Reznik <pinir@expand.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-mergetool.sh')
-rwxr-xr-x | git-mergetool.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/git-mergetool.sh b/git-mergetool.sh index 5587c5ece..2f31fa241 100755 --- a/git-mergetool.sh +++ b/git-mergetool.sh @@ -152,10 +152,11 @@ merge_file () { exit 1 fi - BACKUP="$path.BACKUP.$$" - LOCAL="$path.LOCAL.$$" - REMOTE="$path.REMOTE.$$" - BASE="$path.BASE.$$" + ext="$$$(expr "$path" : '.*\(\.[^/]*\)$')" + BACKUP="$path.BACKUP.$ext" + LOCAL="$path.LOCAL.$ext" + REMOTE="$path.REMOTE.$ext" + BASE="$path.BASE.$ext" mv -- "$path" "$BACKUP" cp -- "$BACKUP" "$path" |