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

BUG: Git blame provides incorrect previous commit if the line is uncommitted

From
EAEric Amodio <eamodio@gmail.com>
Date
Sep 26, 2016, 12:29 UTC
Message-ID
<CAJxnqO6oMG2RvwP7y0Yt_xTrfeqqO6ZOUn5HWF7-h1hcjY+=bg@mail.gmail.com>

This is the first time I've reported a bug with Git so please forgive me if this isn't the right place, format, etc.

If git blame --porcelain (or --line-porcelain or --incremental) is run on a file that has uncommitted changes any uncommitted lines have the wrong previous sha. Instead of the sha the last time that line was changed or even the last time the file was changed it seem to return the last commit in the repository. This seems to only affect uncommitted lines, other line seem to be populated properly.

I am using git version 2.10.0 on macOS 10.12 (16A323).
Please let me know if I can provide any more information.

Thanks, Eric Amodio

Next: Junio C Hamano
Message 1 of 2 in “BUG: Git blame provides incorrect previous commit if the line is uncommitted”
  1. Eric AmodioSep 26, 2016
  2. Junio C HamanoSep 26, 2016

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.