Re: Finally implement "git log --follow"

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

 




On Tue, 19 Jun 2007, Linus Torvalds wrote:
> 
> People who want to improve on it should get rid of the memory leak I 
> introduced - I decided to not bother cleaning up the whole rename diff 
> queue, I just reset it. I'm lazy, and I'm a *man*. I do the rough manly 
> stuff, others can clean up after me.
> 
> *Burp*. That hit the spot. *Scratch*

On that note, if people want to decide that "git log" should *default* to 
follow when one filename is given, that's ok by me. A few warnings:

 - You should only do it for the "single file" case, and that's very
   *different* from the "single pattern" case. I often do "git log" on a 
   single directory, and that had better not start doing any "filename 
   following" by default.

   So before turning on "follow" automatically, it should be checked that 
   that exact file exists right now (might be as simplistic as just doing 
   a "lstat()" and verifying that it's a file or symlink in the current 
   working tree)

 - the commit simplification isn't done. So you cannot do "--follow" 
   together with somethign that wants a contiguous history (like gitk) and 
   uses "--parents".

   This is pretty fundamental. The commit simplification is a separate 
   phase over the (non-linear!) commit space, and the "git log --follow" 
   logic is really a *different* logic over the _linear_ space (namely the 
   streaming "log output" space). 

   Two totally different things, in other words. And not compatible.

So if we want to turn on "follow" by default, then I'm certainly ok with 
it, but it needs to be done with care. so I'd almost suggest just adding 
an alias instead, aka

	git config alias.follow 'log --follow'

and then doing

	git follow filename

rather than changing the behaviour of "git log" itself.

			Linus
-
To unsubscribe from this list: 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]

  Powered by Linux