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>
This commit is contained in:
Pini Reznik 2007-12-05 09:19:13 +02:00 коммит произвёл Junio C Hamano
Родитель cec99d8cef
Коммит c3d51cd16a
1 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -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"