Re: blame on a deleted/renamed file

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

 



Dan McGee wrote:
> 
> This is the first thing I have seen svn be able to do[1] that git
> can't. :)
> 
> [1] svn annotate http://path/to/repo/path/to/file@2345

The only thing broken is git-annotate's guessing code to see if you
use the 'git annotate <file> <revision>' (legacy) or 'git annotate
<revision> <file>' syntax.

I'd simply write the unambiguous

  git blame e19d7da4~1 -- "scripts/makepkg.in"

and similarly for other revisions.  And you'll immediately notice that
git *can* do this.

> OK, it did a move of a bunch of lines into functions that GIT couldn't
> quite track:

You can try

  git blame -C -C scripts/makepkg.sh.in

to let git try *really* hard to find out where the lines come from.
Note that it does find some lines from older commits, e.g.,

  2ef1c841 scripts/makepkg.in    (Dag Odenhall                2007-05-30 23:04:36 +0200  470)

in the body of download_sources, which was moved (but apparently not
changed) in e19d7da4 (Andrew Fyfe, 2007-06-01 22:10:27 +0100).

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
--
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]