Re: Rename handling

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Steven Grimm
Date: Monday, March 19, 2007 - 12:21 pm

Andy Parkins wrote:

I said as much in my mail. The problem is that "commit the rename 
without any changes to the content" is synonymous in many cases with 
"commit a revision that fails to compile." Which may or may not be 
acceptable in some environments but is, to me at least, a sign that 
something is inadequate in the version control system. I shouldn't be 
forced to have a broken build in my revision history just to be 100% 
certain my rename will be tracked accurately.


The following is actually my biggest beef with git's rename tracking, 
and it has nothing whatsoever to do with git-log (though I agree git-log 
needs to track renames too):

$ ls
dir1
$ ls dir1
file1 file2 file3
$ echo "#include file1" > dir1/file4
$ git add dir1/file4
$ git commit
$ git pull
$ ls
dir1 dir2
$ ls dir1
file4
$ ls dir2
file1 file2 file3

That's just plain broken in my opinion. One can perhaps contrive a test 
case or two where that's the desired behavior, but in the real world it 
is almost never what you actually want.

By the way, I don't think fixing that is necessarily related to how 
renames get detected, so in some sense it's a different bug report / 
feature request than the rename hints one. It would be possible to 
figure out the directory had been renamed based purely on content 
analysis; a bunch of files all individually renamed to the same places 
under a new directory, and a lack of any files at all left in the old 
one, probably means the directory got renamed. The content-based rename 
detector could handle this case.

-Steve
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Rename handling, John Goerzen, (Mon Mar 19, 9:10 am)
Re: Rename handling, Steven Grimm, (Mon Mar 19, 11:14 am)
Re: Rename handling, Nicolas Pitre, (Mon Mar 19, 11:35 am)
Re: Rename handling, Linus Torvalds, (Mon Mar 19, 11:48 am)
Re: Rename handling, Andy Parkins, (Mon Mar 19, 12:03 pm)
Re: Rename handling, Daniel Barkalow, (Mon Mar 19, 12:15 pm)
Re: Rename handling, Steven Grimm, (Mon Mar 19, 12:21 pm)
Re: Rename handling, Steven Grimm, (Mon Mar 19, 12:36 pm)
Re: Rename handling, Steven Grimm, (Mon Mar 19, 12:45 pm)
Re: Rename handling, Steven Grimm, (Mon Mar 19, 12:57 pm)
Re: Rename handling, Robin Rosenberg, (Mon Mar 19, 1:02 pm)
Re: Rename handling, Linus Torvalds, (Mon Mar 19, 1:07 pm)
Re: Rename handling, Nicolas Pitre, (Mon Mar 19, 1:17 pm)
Re: Rename handling, Martin Langhoff, (Mon Mar 19, 1:19 pm)
Re: Rename handling, Linus Torvalds, (Mon Mar 19, 1:22 pm)
Re: Rename handling, Linus Torvalds, (Mon Mar 19, 1:34 pm)
Re: Rename handling, Daniel Barkalow, (Mon Mar 19, 1:44 pm)
Re: Rename handling, Junio C Hamano, (Tue Mar 20, 1:33 am)