# 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,
# 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"
# Be careful for funny filename such as "-L" in "$4", which
# would confuse "merge" greatly.
src1=`git-unpack-file $2`
# Be careful for funny filename such as "-L" in "$4", which
# would confuse "merge" greatly.
src1=`git-unpack-file $2`
ret=$?
# Create the working tree file, using "our tree" version from the
# index, and then store the result of the merge.
ret=$?
# Create the working tree file, using "our tree" version from the
# index, and then store the result of the merge.