User: Password:
|
|
Subscribe / Log in / New account

How were the moved/renamed files accounted for ?

How were the moved/renamed files accounted for ?

Posted Feb 26, 2010 16:33 UTC (Fri) by phdm (guest, #56884)
In reply to: How were the moved/renamed files accounted for ? by corbet
Parent article: How old is our kernel?

I didn't know that 'git blame' did such a good job. Does 'git log' also do such a nice job now (following moves and renames) ?


(Log in to post comments)

How were the moved/renamed files accounted for ?

Posted Feb 26, 2010 18:31 UTC (Fri) by dlang (subscriber, #313) [Link]

I believe that there is a -M flag that tells these tools to follows moves and renames (and IIRC you can give it an argument to tell it how hard to look for moves and renames)

this can also track when parts of a file are copied to another file.

How were the moved/renamed files accounted for ?

Posted Mar 1, 2010 3:42 UTC (Mon) by phdm (guest, #56884) [Link]

In my experience, 'git log -M' did never give the full log of a single file.
I have now discovered that 'git log --follow' does.

How were the moved/renamed files accounted for ?

Posted Mar 2, 2010 1:13 UTC (Tue) by jnareb (subscriber, #46500) [Link]

In my experience, 'git log -M' did never give the full log of a single file. I have now discovered that 'git log --follow' does.
Actually the problem is that in "git log -M filename" the filename part is path limiter, and is applied (for history simplification) before rename detection, and that is why you need "git log --follow filename". "git log -M" (no pathspec), or "git log -M directory" should work as expected.

How were the moved/renamed files accounted for ?

Posted Mar 2, 2010 12:47 UTC (Tue) by nye (guest, #51576) [Link]

So -M (detect renames) seems from a user's point of view to act differently depending on whether you're trying to log a file or the whole project.

This seems like a good, specific example of one of those usability issues people are always handwaving about.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds