Re: [git] Re: git log -M -- filename is not working?

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

 



On May  8, Jeff King wrote:
> On Fri, May 07, 2010 at 02:37:09PM -0400, Eli Barzilay wrote:
> 
> > BTW, I've had at least 4 people now who got confused by this.  Is
> > there any use for -M/-C without --follow?  In any case, it will be
> > very helpful if the -M/-C descriptions said "see also --follow".
> 
> Yes, it detects renames when doing diffs.

OK, so just to clear this up: -C and -M (and --find-copies-harder) are
for `diff', and --follow is for `log' with a single file (and each
will pass it on to the other)?


> Documentation patch is below.

Thanks!  (It would also be nice to mention it in -C, but not critical
since it's right after -M.)


> > Also, is there a way to set this as the default for `git log'?
> 
> If you mean --follow, then no. Nor would you probably want to,
> because the --follow mechanism (as currently implemented) is pretty
> restricted.  It can only take a single path currently.

Well, the "algorithm" I used was probably one that is very popular:

* use `git log some-file' with something that got renamed recently
* be horrified that all history is gone
* remember something vague about git detecting renames => go look at
  the man page
* Find -M, add it, try it, still doesn't work
* Go back to scanning the man page, repeat
* At the end I end up with:
    -C -M --find-copies-harder --follow

So if there was some single

  --do-whatever-you-can-as-much-as-you-can-to-find-all-renames

option that would just turn everything on for all commands (eg, -M and
-C and --find-copies harder for diffs, --follow for log for a single
file, and in some future when it's implemented, --follow for multiple
files and directories), I'd happily jump on that.  For any command
that can accept it.  If there was a way to make it the default, I'd
love to turn it on.

Even with the chain of more flags with descriptions that sound like
they're trying to scare me away by promising that my machine will work
for a REALLY LONG TIME, I'd still want to turn it on -- if it got
something slower I sure didn't notice it so far, and that's on a real
repository which is not that small (but with git's reputation I won't
be surprised if "slower" means that I had to way a whole extra 20ms
for an answer...).  If something would really take too long, as in me
sitting any waiting for an answer, *then* I can try to remove that and
see if I ran into some of the horrible edge cases...

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!
--
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]