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

Re: git blame for a commit

From
IHIan Hilt <ian.hilt@gmx.com>
Date
Jun 23, 2008, 03:40 UTC
Message-ID
<alpine.LFD.1.10.0806222300410.23258@sys-0.hiltweb.site>
In-Reply-To
<485ED2E5.3070906@mircea.bardac.net>
On Sun, 22 Jun 2008 at 11:32pm +0100, Mircea Bardac wrote:
> Hi everyone,
> 
> Is there any straightforward way of doing git blame for all the files that got
> changed in a commit. Problems are renames, deletes and copies.

Sounds like you want to track files rather than content. Git tracks the latter.

Show 7 quoted lines
> I was also thinking of git diff with a huge number of context lines, but this
> one feels a bit hacking. "git diff" is also missing author info, so "git
> blame" is a bit more desirable.
> 
> Has anyone ever done this before?
> 
> Many thanks.

Try "git diff --name-only commit1..commit2" or "git log --name-only commit1..commit2". This will give you only the names of the files in which content was altered. Other than that, I think you should re-read (hint) git-blame(1). It's focus is on content, not files as a whole.

-- Ian Hilt Ian.Hilt (at) gmx.com GnuPG key: 0x4AFC1EE3

Previous: Mircea BardacNext: Mircea Bardac
Message 2 of 6 in “git blame for a commit”
  1. Mircea BardacJun 22, 2008
  2. Ian HiltJun 23, 2008
  3. Mircea BardacJun 23, 2008
  4. Jakub NarebskiJun 23, 2008
  5. Ian HiltJun 23, 2008
  6. Jakub NarebskiJun 23, 2008

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.