summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-12-09 09:01:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-12-09 09:01:50 (GMT)
commit05e74f4111b5ce5995dd1145f83398fe40a318e0 (patch)
tree142555949f04cb53d2783188f8717ede7a1b682a
parent9b433e44964202befd175f1f28687067b8bd058f (diff)
parentc3d51cd16a8db417b89608a37410cf3bf8a5b137 (diff)
downloadgit-05e74f4111b5ce5995dd1145f83398fe40a318e0.zip
git-05e74f4111b5ce5995dd1145f83398fe40a318e0.tar.gz
git-05e74f4111b5ce5995dd1145f83398fe40a318e0.tar.bz2
Merge branch 'pr/mergetool'
* pr/mergetool: Open external merge tool with original file extensions for all three files
-rwxr-xr-xgit-mergetool.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/git-mergetool.sh b/git-mergetool.sh
index 5587c5e..2f31fa2 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"