From: Theodore Ts'o Date: Sat, 29 Sep 2007 01:23:22 +0000 (-0400) Subject: mergetool: fix emerge when running in a subdirectory X-Git-Tag: v1.5.3.3~3^2~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f6e0e559340af6e300b63da061fa05ff07e3d6f6;p=git.git mergetool: fix emerge when running in a subdirectory Only pass the basename of the output filename when to emerge, since emerge interprets non-absolute pathnames relative to the containing directory of the output buffer. Thanks to Kelvie Wong for pointing this out. Signed-off-by: "Theodore Ts'o" --- diff --git a/git-mergetool.sh b/git-mergetool.sh index e00682a51..a92019a1e 100755 --- a/git-mergetool.sh +++ b/git-mergetool.sh @@ -252,9 +252,9 @@ merge_file () { ;; emerge) if base_present ; then - emacs -f emerge-files-with-ancestor-command "$LOCAL" "$REMOTE" "$BASE" "$path" + emacs -f emerge-files-with-ancestor-command "$LOCAL" "$REMOTE" "$BASE" "$(basename "$path")" else - emacs -f emerge-files-command "$LOCAL" "$REMOTE" "$path" + emacs -f emerge-files-command "$LOCAL" "$REMOTE" "$(basename "$path")" fi status=$? save_backup