summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a734291)
raw | patch | inline | side by side (parent: a734291)
author | Junio C Hamano <gitster@pobox.com> | |
Sun, 8 Jul 2007 21:42:05 +0000 (14:42 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 9 Jul 2007 01:24:19 +0000 (18:24 -0700) |
When commit ed93b449 changed the script so that it does not
touch untracked working tree file, we forgot that we still
needed to resolve the index entry (otherwise they are left
unmerged).
Signed-off-by: Junio C Hamano <gitster@pobox.com>
touch untracked working tree file, we forgot that we still
needed to resolve the index entry (otherwise they are left
unmerged).
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-merge-one-file.sh | patch | blob | history |
diff --git a/git-merge-one-file.sh b/git-merge-one-file.sh
index ebbb5759652c58916e5066f9f4f3f842d0c44492..1e7727d2763e744b94f55c2056eccaab12367c9e 100755 (executable)
--- a/git-merge-one-file.sh
+++ b/git-merge-one-file.sh
# read-tree checked that index matches HEAD already,
# so we know we do not have this path tracked.
# there may be an unrelated working tree file here,
- # which we should just leave unmolested.
- exit 0
+ # which we should just leave unmolested. Make sure
+ # we do not have it in the index, though.
+ exec git update-index --remove -- "$4"
fi
if test -f "$4"; then
rm -f -- "$4" &&
#
".$2.")
# the other side did not add and we added so there is nothing
- # to be done.
+ # to be done, except making the path merged.
+ exec git update-index --add --cacheinfo "$6" "$2" "$4"
;;
"..$3")
echo "Adding $4"
echo "ERROR: untracked $4 is overwritten by the merge."
exit 1
}
- git update-index --add --cacheinfo "$6$7" "$2$3" "$4" &&
+ git update-index --add --cacheinfo "$7" "$3" "$4" &&
exec git checkout-index -u -f -- "$4"
;;