mirror of
https://github.com/git/git.git
synced 2024-11-13 20:53:02 +01:00
81ed7b9581
TortoiseGitMerge, unlike TortoiseMerge, can be told to handle paths with spaces in them by using -option "$FILE" (not -option:"$FILE", which does not work for such paths) syntax. This change was necessary because of MSYS path mangling [1], the ":" after the "base" etc. arguments to TortoiseMerge caused the whole argument instead of just the file name to be quoted in case of file names with spaces. So TortoiseMerge was passed "-base:new file.txt" instead of -base:"new file.txt" (including the quotes). To work around this, TortoiseGitMerge does not require the ":" after the arguments anymore which fixes handling file names with spaces [2] (as written above). [1] http://www.mingw.org/wiki/Posix_path_conversion [2] https://github.com/msysgit/msysgit/issues/57 Signed-off-by: Sven Strickroth <email@cs-ware.de> Reported-by: Sebastian Schuberth <sschuberth@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
34 lines
638 B
Text
34 lines
638 B
Text
can_diff () {
|
|
return 1
|
|
}
|
|
|
|
merge_cmd () {
|
|
if $base_present
|
|
then
|
|
touch "$BACKUP"
|
|
basename="$(basename "$merge_tool_path" .exe)"
|
|
if test "$basename" = "tortoisegitmerge"
|
|
then
|
|
"$merge_tool_path" \
|
|
-base "$BASE" -mine "$LOCAL" \
|
|
-theirs "$REMOTE" -merged "$MERGED"
|
|
else
|
|
"$merge_tool_path" \
|
|
-base:"$BASE" -mine:"$LOCAL" \
|
|
-theirs:"$REMOTE" -merged:"$MERGED"
|
|
fi
|
|
check_unchanged
|
|
else
|
|
echo "$merge_tool_path cannot be used without a base" 1>&2
|
|
return 1
|
|
fi
|
|
}
|
|
|
|
translate_merge_tool_path() {
|
|
if type tortoisegitmerge >/dev/null 2>/dev/null
|
|
then
|
|
echo tortoisegitmerge
|
|
else
|
|
echo tortoisemerge
|
|
fi
|
|
}
|