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

[PATCH 1/1] docs/git-blame: describe sourceline and resultline

From
PPPhilip Patsch <philip@decentsoftwa.re>
Date
Oct 10, 2025, 15:21 UTC
Message-ID
<20251010152204.815520-2-philip@decentsoftwa.re>
In-Reply-To
<20251010152204.815520-1-philip@decentsoftwa.re>

The manpage did not make clean what source and resultlines refer to. This simple adjustment should remove that confusion.

Based on the question and answer on this Stackoverflow page: https://stackoverflow.com/questions/49370690/what-is-sourceline-resultline-in-git-blame-incremental-output

Signed-off-by: Philip Patsch <philip@decentsoftwa.re>
---
 Documentation/git-blame.adoc | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-blame.adoc b/Documentation/git-blame.adoc
index e438d28625..870d0de0a5 100644
--- a/Documentation/git-blame.adoc
+++ b/Documentation/git-blame.adoc
@@ -113,8 +113,10 @@ In this format, each line is output after a header; the
 header at the minimum has the first line which has:
 
 - 40-byte SHA-1 of the commit the line is attributed to;
-- the line number of the line in the original file;
-- the line number of the line in the final file;
+- the line number of the line in the original file,
+  from when the commit was made;
+- the line number of the line in the final file,
+  from the current state of the file;
 - on a line that starts a group of lines from a different
   commit than the previous one, the number of lines in this
   group.  On subsequent lines this field is absent.
@@ -214,6 +216,9 @@ annotated.
 	<40-byte-hex-sha1> <sourceline> <resultline> <num-lines>
 +
 Line numbers count from 1.
++
+<sourceline> is where this line shows up in the original source commit.
+<resultline> is where this line shows up in the current state of the file.
 
 . The first time that a commit shows up in the stream, it has various
   other information about it printed out with a one-word tag at the
-- 
2.49.0
Previous: Philip PatschNext: Junio C Hamano
Message 2 of 5 in “docs/git-blame: describe sourceline and resultline”
  1. 0/1 docs/git-blame: describe sourceline and resultlinePhilip Patsch, Oct 10, 2025
  2. 1/1 docs/git-blame: describe sourceline and resultlinePhilip Patsch, Oct 10, 2025
  3. Junio C HamanoOct 10, 2025
  4. Junio C HamanoOct 10, 2025
  5. Philip PatschOct 14, 2025

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.