All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Junio C Hamano <junkio@cox.net>
Cc: Daniel Barkalow <barkalow@iabervon.org>,
	Sam Ravnborg <sam@ravnborg.org>,
	Linus Torvalds <torvalds@osdl.org>,
	Fredrik Kuivinen <freku045@student.liu.se>,
	git@vger.kernel.org
Subject: Re: Moved files and merges
Date: Mon, 05 Sep 2005 08:16:55 -0700	[thread overview]
Message-ID: <431C6167.4070703@zytor.com> (raw)
In-Reply-To: <7vvf1gejjf.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano wrote:
> 
>>  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.
> 

One question, of course, is if one should simply keep additional 
metadata around to handle this sort of situations.  One could, for 
example, keep a UUID for each file, which would be carried over by the 
renaming commit.  If one runs into a tree which doesn't have the UUIDs, 
they should be generated at that time (this could be a bit tricky to do 
without invalidating all signatures in the tree, since the obvious way 
-- adding it to the tree object -- would invalidate all the commit and 
tag objects.)

In some ways this is similar to the Unix filesystem model of separating 
location (pathname) from identity (device:inode).

It would also hade the somewhat interesting possibility that one could 
"remove and recreate" a file and have it exist as a different entity. 
That probably needs to be a user option.

	-hpa

  reply	other threads:[~2005-09-05 15:17 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
2005-09-05 15:16                   ` H. Peter Anvin [this message]
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=431C6167.4070703@zytor.com \
    --to=hpa@zytor.com \
    --cc=barkalow@iabervon.org \
    --cc=freku045@student.liu.se \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.