Skip to content

Commit

Permalink
mergetool: fix emerge when running in a subdirectory
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Theodore Ts'o committed Sep 29, 2007
1 parent 769f398 commit f6e0e55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git-mergetool.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f6e0e55

Please sign in to comment.