git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: blame on a deleted/renamed file

From
Thomas Rast <trast@student.ethz.ch>
Date
Aug 5, 2009, 13:24 UTC
Message-ID
<200908051524.46502.trast@student.ethz.ch>
In-Reply-To
<449c10960908050516k25ef0a92sd8616de29a93ea5f@mail.gmail.com>
Dan McGee wrote:
Show 5 quoted lines
> 
> 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
Previous: Björn SteinbrinkNext: Junio C Hamano
Message 6 of 8 in “blame on a deleted/renamed file”
  1. Dan McGeeAug 5, 2009
  2. Björn SteinbrinkAug 5, 2009
  3. Matthieu MoyAug 5, 2009
  4. Dan McGeeAug 5, 2009
  5. Björn SteinbrinkAug 5, 2009
  6. Thomas RastAug 5, 2009
  7. Junio C HamanoAug 5, 2009
  8. Björn SteinbrinkAug 5, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.