diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-12-09 01:01:50 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-12-09 01:01:50 -0800 |
commit | 05e74f4111b5ce5995dd1145f83398fe40a318e0 (patch) | |
tree | 142555949f04cb53d2783188f8717ede7a1b682a | |
parent | 9b433e44964202befd175f1f28687067b8bd058f (diff) | |
parent | c3d51cd16a8db417b89608a37410cf3bf8a5b137 (diff) | |
download | git-05e74f4111b5ce5995dd1145f83398fe40a318e0.tar.gz |
Merge branch 'pr/mergetool'
* pr/mergetool:
Open external merge tool with original file extensions for all three files
-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 5587c5ecea..2f31fa2417 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" |