Skip to content

Commit

Permalink
merge-one-file: leave unmerged index entries upon automerge failure.
Browse files Browse the repository at this point in the history
When automerge fails, we used to collapse the path to stage0
from "our" branch, to help "diff-files" users to view the
half-merged state against the current HEAD.  Now diff-files has
been taught how to compare with unmerged stage2,leaving them
unmerged is a better thing to do, especially this prevents the
unresolved conflicts to be committed by mistake.

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Linus Torvalds authored and Junio C Hamano committed Nov 30, 2005
1 parent 10637b8 commit 354b9b5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions git-merge-one-file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,7 @@ case "${1:-.}${2:-.}${3:-.}" in
;;
esac

# We reset the index to the first branch, making
# git-diff-file useful
git-update-index --add --cacheinfo "$6" "$2" "$4"
git-checkout-index -u -f -- "$4" &&
merge "$4" "$orig" "$src2"
merge "$4" "$orig" "$src2"
ret=$?
rm -f -- "$orig" "$src2"

Expand Down

0 comments on commit 354b9b5

Please sign in to comment.