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" <tytso@mit.edu>
Theodore Ts'o committed
Sep 28, 2007 at 21:23 UTC
f6e0e559340af6e300b63da061fa05ff07e3d6f6
1 file changed
+2
-2
git-mergetool.sh
+2
-2
@@ -252,9 +252,9 @@ merge_file () {
252
;;
253
emerge)
254
if base_present ; then
255
- emacs -f emerge-files-with-ancestor-command "$LOCAL" "$REMOTE" "$BASE" "$path"
255
+ emacs -f emerge-files-with-ancestor-command "$LOCAL" "$REMOTE" "$BASE" "$(basename "$path")"
256
else
257
- emacs -f emerge-files-command "$LOCAL" "$REMOTE" "$path"
257
+ emacs -f emerge-files-command "$LOCAL" "$REMOTE" "$(basename "$path")"
258
fi
259
status=$?
260
save_backup