blame on a deleted/renamed file
- From
Dan McGee <dpmcgee@gmail.com>
- Date
- Aug 5, 2009, 12:16 UTC
- Message-ID
- <449c10960908050516k25ef0a92sd8616de29a93ea5f@mail.gmail.com>
Is there no easy way in git to get a blame on a file that has either been renamed or deleted? I'll step through my thought process, and a quick google and read of the manpage returned nothing obvious. Here is the repository in question if it matters: git://projects.archlinux.org/pacman.git. I located a particular commit I was interested using a plain git-blame: $ git blame scripts/makepkg.sh.in
OK, looks like lines moved around enough that we got stuck here, let's see what this patch did: $ git show e19d7da4
OK, it did a move of a bunch of lines into functions that GIT couldn't quite track: $ git annotate --follow "scripts/makepkg.in" e19d7da4~1 fatal: cannot stat path 'scripts/makepkg.in': No such file or directory
$ git annotate --follow "scripts/makepkg.sh.in" e19d7da4~1 fatal: no such path scripts/makepkg.sh.in in e19d7da4~1
Help? Or do I need to think about writing some sort of patch for it? This is the first thing I have seen svn be able to do[1] that git can't. :)
-Dan
[1] svn annotate http://path/to/repo/path/to/file@2345