swh:1:snp:87728f882295b5ba27035837248a04c5be121c53
Revision 28e77a81647584bfbe112f19e12e9952ab0b2fab authored by Junio C Hamano on 11 December 2005, 06:05:01 UTC, committed by Junio C Hamano on 11 December 2005, 09:47:15 UTC
This does two things.

 - When one branch renamed and the other branch did not, the
   resulting half-merged file in the working tree used to swap
   branches around and showed as if renaming side was "ours".
   This was confusing and inconsistent (even though the conflict
   markers were marked with branch names, it was not a good
   enough excuse).  This changes the order of arguments to
   mergeFile in such a case to make sure we always see "our"
   change between <<< and ===, and "their" change between ===
   and >>>.

 - When both branches renamed to the same path, and when one
   branch renamed and the other branch did not, we attempt
   mergeFile.  When this automerge conflicted, we used to
   collapse the index.  Now we use update-index --index-info
   to inject higher stage entries to leave the index in unmerged
   state for these two cases.

What this still does _not_ do is to inject unmerged state into
the index when the structural changes conflict.  I have not
thought things through what to do in each case yet, but the
cases this commit cover are the most common ones, so this would
be a good start.

Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 7564577
History
Tip revision: 6c40894d2466d4e7fddc047a05116aa9d14712ee authored by Junio C Hamano on 30 August 2021, 23:06:22 UTC
The second batch
Tip revision: 6c40894
File Mode Size
Documentation
arm
compat
debian
mozilla-sha1
ppc
t
templates
.gitignore -rw-r--r-- 1.6 KB
COPYING -rw-r--r-- 18.3 KB
INSTALL -rw-r--r-- 3.8 KB
Makefile -rw-r--r-- 14.1 KB
README -rw-r--r-- 24.7 KB
apply.c -rw-r--r-- 43.0 KB
blob.c -rw-r--r-- 1.3 KB
blob.h -rw-r--r-- 311 bytes
cache.h -rw-r--r-- 12.0 KB
cat-file.c -rw-r--r-- 1.3 KB
check-ref-format.c -rw-r--r-- 248 bytes
checkout-index.c -rw-r--r-- 4.9 KB
clone-pack.c -rw-r--r-- 6.6 KB
cmd-rename.sh -rwxr-xr-x 1.7 KB
commit-tree.c -rw-r--r-- 3.1 KB
commit.c -rw-r--r-- 14.3 KB
commit.h -rw-r--r-- 2.0 KB
config.c -rw-r--r-- 12.1 KB
connect.c -rw-r--r-- 13.9 KB
convert-objects.c -rw-r--r-- 7.1 KB
copy.c -rw-r--r-- 750 bytes
count-delta.c -rw-r--r-- 2.2 KB
count-delta.h -rw-r--r-- 196 bytes
csum-file.c -rw-r--r-- 2.9 KB
csum-file.h -rw-r--r-- 566 bytes
ctype.c -rw-r--r-- 890 bytes
daemon.c -rw-r--r-- 14.2 KB
date.c -rw-r--r-- 13.5 KB
delta.h -rw-r--r-- 919 bytes
diff-delta.c -rw-r--r-- 7.1 KB
diff-files.c -rw-r--r-- 3.7 KB
diff-index.c -rw-r--r-- 5.5 KB
diff-stages.c -rw-r--r-- 2.3 KB
diff-tree.c -rw-r--r-- 5.8 KB
diff.c -rw-r--r-- 33.7 KB
diff.h -rw-r--r-- 4.0 KB
diffcore-break.c -rw-r--r-- 8.4 KB
diffcore-order.c -rw-r--r-- 2.2 KB
diffcore-pathspec.c -rw-r--r-- 1.2 KB
diffcore-pickaxe.c -rw-r--r-- 2.5 KB
diffcore-rename.c -rw-r--r-- 12.7 KB
diffcore.h -rw-r--r-- 3.4 KB
entry.c -rw-r--r-- 3.6 KB
environment.c -rw-r--r-- 1.8 KB
epoch.c -rw-r--r-- 16.9 KB
epoch.h -rw-r--r-- 476 bytes
fetch-pack.c -rw-r--r-- 10.5 KB
fetch.c -rw-r--r-- 4.7 KB
fetch.h -rw-r--r-- 1.4 KB
fsck-objects.c -rw-r--r-- 12.3 KB
get-tar-commit-id.c -rw-r--r-- 514 bytes
git-add.sh -rwxr-xr-x 655 bytes
git-am.sh -rwxr-xr-x 9.6 KB
git-applymbox.sh -rwxr-xr-x 2.8 KB
git-applypatch.sh -rwxr-xr-x 5.3 KB
git-archimport.perl -rwxr-xr-x 34.3 KB
git-bisect.sh -rwxr-xr-x 5.3 KB
git-branch.sh -rwxr-xr-x 2.3 KB
git-checkout.sh -rwxr-xr-x 3.2 KB
git-cherry.sh -rwxr-xr-x 1.8 KB
git-clone.sh -rwxr-xr-x 5.1 KB
git-commit.sh -rwxr-xr-x 5.5 KB
git-compat-util.h -rw-r--r-- 2.5 KB
git-count-objects.sh -rwxr-xr-x 706 bytes
git-cvsexportcommit.perl -rwxr-xr-x 5.4 KB
git-cvsimport.perl -rwxr-xr-x 20.9 KB
git-diff.sh -rwxr-xr-x 1.3 KB
git-fetch.sh -rwxr-xr-x 7.7 KB
git-fmt-merge-msg.perl -rwxr-xr-x 1.8 KB
git-format-patch.sh -rwxr-xr-x 6.1 KB
git-grep.sh -rwxr-xr-x 738 bytes
git-log.sh -rwxr-xr-x 351 bytes
git-lost-found.sh -rwxr-xr-x 421 bytes
git-ls-remote.sh -rwxr-xr-x 1.6 KB
git-merge-octopus.sh -rwxr-xr-x 2.1 KB
git-merge-one-file.sh -rwxr-xr-x 2.7 KB
git-merge-ours.sh -rwxr-xr-x 356 bytes
git-merge-recursive.py -rwxr-xr-x 30.0 KB
git-merge-resolve.sh -rwxr-xr-x 942 bytes
git-merge-stupid.sh -rwxr-xr-x 1.4 KB
git-merge.sh -rwxr-xr-x 6.2 KB
git-mv.perl -rwxr-xr-x 4.7 KB
git-octopus.sh -rwxr-xr-x 2.2 KB
git-parse-remote.sh -rwxr-xr-x 4.1 KB
git-prune.sh -rwxr-xr-x 788 bytes
git-pull.sh -rwxr-xr-x 2.5 KB
git-push.sh -rwxr-xr-x 1.1 KB
git-rebase.sh -rwxr-xr-x 1.3 KB
git-relink.perl -rwxr-xr-x 4.0 KB
git-repack.sh -rwxr-xr-x 1.5 KB
git-request-pull.sh -rwxr-xr-x 851 bytes
git-reset.sh -rwxr-xr-x 2.1 KB
git-resolve.sh -rwxr-xr-x 2.3 KB
git-revert.sh -rwxr-xr-x 4.0 KB
git-send-email.perl -rwxr-xr-x 8.4 KB
git-sh-setup.sh -rwxr-xr-x 706 bytes
git-shortlog.perl -rwxr-xr-x 4.0 KB
git-status.sh -rwxr-xr-x 1.9 KB
git-svnimport.perl -rwxr-xr-x 19.1 KB
git-tag.sh -rwxr-xr-x 2.2 KB
git-verify-tag.sh -rwxr-xr-x 433 bytes
git-whatchanged.sh -rwxr-xr-x 264 bytes
git.c -rw-r--r-- 6.1 KB
git.spec.in -rw-r--r-- 6.3 KB
gitMergeCommon.py -rw-r--r-- 6.8 KB
gitk -rwxr-xr-x 112.5 KB
hash-object.c -rw-r--r-- 1.8 KB
http-fetch.c -rw-r--r-- 23.1 KB
http-push.c -rw-r--r-- 36.2 KB
http.c -rw-r--r-- 10.0 KB
http.h -rw-r--r-- 2.2 KB
ident.c -rw-r--r-- 4.4 KB
index-pack.c -rw-r--r-- 11.5 KB
index.c -rw-r--r-- 1.1 KB
init-db.c -rw-r--r-- 7.1 KB
local-fetch.c -rw-r--r-- 5.7 KB
ls-files.c -rw-r--r-- 15.4 KB
ls-tree.c -rw-r--r-- 2.7 KB
mailinfo.c -rw-r--r-- 15.5 KB
mailsplit.c -rw-r--r-- 3.1 KB
merge-base.c -rw-r--r-- 6.0 KB
merge-index.c -rw-r--r-- 2.6 KB
mktag.c -rw-r--r-- 3.2 KB
name-rev.c -rw-r--r-- 5.2 KB
object.c -rw-r--r-- 5.7 KB
object.h -rw-r--r-- 1.5 KB
pack-check.c -rw-r--r-- 3.7 KB
pack-objects.c -rw-r--r-- 13.3 KB
pack-redundant.c -rw-r--r-- 14.7 KB
pack.h -rw-r--r-- 618 bytes
patch-delta.c -rw-r--r-- 1.7 KB
patch-id.c -rw-r--r-- 1.5 KB
path.c -rw-r--r-- 5.3 KB
peek-remote.c -rw-r--r-- 1.0 KB
pkt-line.c -rw-r--r-- 2.5 KB
pkt-line.h -rw-r--r-- 270 bytes
prune-packed.c -rw-r--r-- 1.5 KB
quote.c -rw-r--r-- 5.6 KB
quote.h -rw-r--r-- 1.5 KB
read-cache.c -rw-r--r-- 13.8 KB
read-tree.c -rw-r--r-- 15.6 KB
receive-pack.c -rw-r--r-- 6.1 KB
refs.c -rw-r--r-- 8.3 KB
refs.h -rw-r--r-- 1.0 KB
repo-config.c -rw-r--r-- 2.6 KB
rev-list.c -rw-r--r-- 19.8 KB
rev-parse.c -rw-r--r-- 5.5 KB
rsh.c -rw-r--r-- 2.2 KB
rsh.h -rw-r--r-- 159 bytes
run-command.c -rw-r--r-- 1.4 KB
run-command.h -rw-r--r-- 447 bytes
send-pack.c -rw-r--r-- 7.1 KB
server-info.c -rw-r--r-- 5.0 KB
setup.c -rw-r--r-- 4.3 KB
sha1_file.c -rw-r--r-- 36.3 KB
sha1_name.c -rw-r--r-- 9.9 KB
shell.c -rw-r--r-- 1.1 KB
show-branch.c -rw-r--r-- 14.9 KB
show-index.c -rw-r--r-- 593 bytes
ssh-fetch.c -rw-r--r-- 3.5 KB
ssh-pull.c -rw-r--r-- 154 bytes
ssh-push.c -rw-r--r-- 155 bytes
ssh-upload.c -rw-r--r-- 2.8 KB
strbuf.c -rw-r--r-- 807 bytes
strbuf.h -rw-r--r-- 216 bytes
stripspace.c -rw-r--r-- 786 bytes
symbolic-ref.c -rw-r--r-- 785 bytes
tag.c -rw-r--r-- 2.6 KB
tag.h -rw-r--r-- 471 bytes
tar-tree.c -rw-r--r-- 10.8 KB
test-date.c -rw-r--r-- 416 bytes
test-delta.c -rw-r--r-- 1.8 KB
tree-diff.c -rw-r--r-- 6.1 KB
tree.c -rw-r--r-- 5.8 KB
tree.h -rw-r--r-- 1.0 KB
unpack-file.c -rw-r--r-- 709 bytes
unpack-objects.c -rw-r--r-- 6.8 KB
update-index.c -rw-r--r-- 12.9 KB
update-ref.c -rw-r--r-- 2.0 KB
update-server-info.c -rw-r--r-- 457 bytes
upload-pack.c -rw-r--r-- 6.0 KB
usage.c -rw-r--r-- 639 bytes
var.c -rw-r--r-- 1.3 KB
verify-pack.c -rw-r--r-- 1.1 KB
write-tree.c -rw-r--r-- 3.9 KB

README

back to top