git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: Sam Ravnborg <sam@ravnborg.org>,
	Linus Torvalds <torvalds@osdl.org>,
	Fredrik Kuivinen <freku045@student.liu.se>,
	"H. Peter Anvin" <hpa@zytor.com>,
	git@vger.kernel.org
Subject: Re: Moved files and merges
Date: Sun, 04 Sep 2005 12:10:12 -0700	[thread overview]
Message-ID: <7vvf1gejjf.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.63.0509041329340.23242@iabervon.org> (Daniel Barkalow's message of "Sun, 4 Sep 2005 14:28:27 -0400 (EDT)")

Daniel Barkalow <barkalow@iabervon.org> writes:

> I think this is actually quite a regular merge, and I think we should be 
> able to offer some assistance. The situation with K is normal: case #3ALT. 
> If someone introduces a file and there's no file or directory with that 
> name in other trees, we assume that the merge should include it.

I was not particularly interested in discussing the initial
merge, which is a perfectly regular merge as you said.  I was
more focusing on reusing the tree-structure change information
we _could_ find in merge #3 when we make later merges, because
that merge is something the user did in the past and would be a
good guide for guessing what the user wants to happen to this
round.

There is no question about K in 'keeping addition' case.  It
gets interesting only when the first merge prefered 'reject
addition by them' and we would want to reuse that preference in
the second merge.  But as I tried to clarify in the "a couple of
things worth mentioning" message, there is no fundamental reason
to treat removal and addition any differently.  It is just a way
to reduce unnecessary conflicts.

> Most likely, this just means that we 
> should not commit automatically, but have the user test the result first.

No question about it again.

> Of course, read-tree is in flux at 
> the moment, so making more structural changes to it at the same time is 
> awkward.

Doing this in read-tree is a bit premature.  I'd prefer a
scripted solution first to see what we want and how well it
works in practice.

>   1
>  / \
> 0-2-3-5-7
>    \   /
>     4-6
>
> It shouldn't matter to the merge at 7 if the 2-3 reorganization was done 
> locally, by applying a patch, or by merging.

There was another problem in my message that treated #3
specially.  I did it that way primarily because I wanted to have
an algorithm that needs to look only limited (namely, one)
number of commits, more than what we currently look at.  The
problem is that the trail #0..#1..#3 (in the example in second
message, whose rename probably happened between #0 and #1) may
change the contents of the renamed file so drastically that diff
between #2 and #3 may not look like rename anymore, while we
could still detect it if we followed the whole trail and looked
for renames between each commit on it.

  reply	other threads:[~2005-09-04 19:10 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-02 23:59 Moved files and merges H. Peter Anvin
2005-09-03  0:20 ` Martin Langhoff
2005-09-04  4:14   ` H. Peter Anvin
2005-09-03  1:36 ` Junio C Hamano
2005-09-03  8:25   ` Junio C Hamano
2005-09-03 18:06     ` Fredrik Kuivinen
2005-09-03 18:53       ` Junio C Hamano
2005-09-03 18:46     ` Junio C Hamano
2005-09-03 19:05       ` Sam Ravnborg
2005-09-03 19:32         ` Junio C Hamano
2005-09-03 22:03           ` Sam Ravnborg
2005-09-04  7:32             ` Junio C Hamano
2005-09-04 18:28               ` Daniel Barkalow
2005-09-04 19:10                 ` Junio C Hamano [this message]
2005-09-05 15:16                   ` H. Peter Anvin
2005-09-05 15:47                     ` Linus Torvalds
2005-09-05 16:37                       ` H. Peter Anvin
2005-09-05 18:08                       ` Junio C Hamano
2005-09-05 18:33                     ` Junio C Hamano
2005-09-05 18:43                       ` H. Peter Anvin
2005-09-04  8:27             ` Junio C Hamano
2005-09-03 19:21       ` Fredrik Kuivinen
2005-09-03 18:59     ` Sam Ravnborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vvf1gejjf.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=barkalow@iabervon.org \
    --cc=freku045@student.liu.se \
    --cc=git@vger.kernel.org \
    --cc=hpa@zytor.com \
    --cc=sam@ravnborg.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).