Skip to content

Commit

Permalink
Merge branch 'pr/mergetool'
Browse files Browse the repository at this point in the history
* pr/mergetool:
  Open external merge tool with original file extensions for all three files
  • Loading branch information
Junio C Hamano committed Dec 9, 2007
2 parents 9b433e4 + c3d51cd commit 05e74f4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions git-mergetool.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 05e74f4

Please sign in to comment.