merge-one-file: leave unmerged index entries upon automerge failure.
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>
Linus Torvalds committed
Nov 29, 2005 at 21:06 UTC
354b9b59b0a02ce7e32a7b0c10caaa1e3532f22b
1 file changed
+1
-5
git-merge-one-file.sh
+1
-5
@@ -79,11 +79,7 @@ case "${1:-.}${2:-.}${3:-.}" in
79
;;
80
esac
81
82
- # We reset the index to the first branch, making
83
- # git-diff-file useful
84
- git-update-index --add --cacheinfo "$6" "$2" "$4"
85
- git-checkout-index -u -f -- "$4" &&
86
- merge "$4" "$orig" "$src2"
82
+ merge "$4" "$orig" "$src2"
83
ret=$?
84
rm -f -- "$orig" "$src2"
85