diff options
author | Linus Torvalds <torvalds@osdl.org> | 2005-11-30 06:06:10 +0100 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-11-30 09:14:19 +0100 |
commit | 354b9b59b0a02ce7e32a7b0c10caaa1e3532f22b (patch) | |
tree | 4c052b89be821bc8fc6366501ee0583432849e86 /git-merge-one-file.sh | |
parent | diff-files: -1/-2/-3 to diff against unmerged stage. (diff) | |
download | git-354b9b59b0a02ce7e32a7b0c10caaa1e3532f22b.tar.xz git-354b9b59b0a02ce7e32a7b0c10caaa1e3532f22b.zip |
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>
Diffstat (limited to 'git-merge-one-file.sh')
-rwxr-xr-x | git-merge-one-file.sh | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/git-merge-one-file.sh b/git-merge-one-file.sh index c3eca8b332..739a07292a 100755 --- a/git-merge-one-file.sh +++ b/git-merge-one-file.sh @@ -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" |