Re: Possible --remove-empty bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Sun, 12 Mar 2006, Junio C Hamano wrote:
> 
> To be honest, I do not know how --remove-empty is intended to
> work.

It's supposed to stop traversing the tree once a pathname disappears.

> Maybe something like this is closer to what the documentation
> says.

If it is, then the documentation is broken.

The fact that a pathname disappears does _not_ make the commit 
uninteresting. It just means that we should stop traversing that parent.

"uninteresting" has a big side effect: it inherits to parents. So if you 
have

	    a
	   / \
	  b   c
	   \ /
	    d

where the pathname disappeared in "b", you must NOT mark it uninteresting, 
because that would mean that "d" is also uninteresting.

There's a huge difference between saying "I will not traverse down this 
line any more" and "I mark this commit uninteresting". The first one just 
stops adding commits to the commit list (but parents deeper down might 
still be interesting because they are also reached through another 
pathway). The second says "this commit and all of its ancestors are 
deemed worthless".

The "path goes away" case is meant to just stop traversal, not mark all 
parents worthless.

		Linus
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]