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

[PATCH] blame: improve diagnosis for "--reverse NEW"

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 14, 2016, 17:20 UTC
Message-ID
<xmqqtwgvadru.fsf@gitster.mtv.corp.google.com>

"git blame --reverse OLD..NEW -- PATH" tells us to start from the contents in PATH at OLD and observe how each line is changed while the history developers up to NEW, and report for each line the latest commit up to which the line survives in the original form.

If you say "git blame --reverse NEW -- PATH" by mistake, we complain about the missing OLD, but we phrased it as "No commit to dig down to?" In this case, however, we are digging up from OLD, so say so.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 Documentation/git-blame.txt | 2 +-
 builtin/blame.c             | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-blame.txt b/Documentation/git-blame.txt
index ba54175..16323eb 100644
--- a/Documentation/git-blame.txt
+++ b/Documentation/git-blame.txt
@@ -10,7 +10,7 @@ SYNOPSIS
 [verse]
 'git blame' [-c] [-b] [-l] [--root] [-t] [-f] [-n] [-s] [-e] [-p] [-w] [--incremental]
 	    [-L <range>] [-S <revs-file>] [-M] [-C] [-C] [-C] [--since=<date>]
-	    [--progress] [--abbrev=<n>] [<rev> | --contents <file> | --reverse <rev>]
+	    [--progress] [--abbrev=<n>] [<rev> | --contents <file> | --reverse <rev>..<rev>]
 	    [--] <file>
 
 DESCRIPTION
diff --git a/builtin/blame.c b/builtin/blame.c
index 21f42b0..281f372 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -2473,7 +2473,7 @@ static char *prepare_initial(struct scoreboard *sb)
 		final_commit_name = revs->pending.objects[i].name;
 	}
 	if (!final_commit_name)
-		die("No commit to dig down to?");
+		die("No commit to dig up from?");
 	return xstrdup(final_commit_name);
 }
 
-- 
2.9.0-290-g8794d48
Next: Junio C Hamano
Message 1 of 3 in “blame: improve diagnosis for "--reverse NEW"”
  1. blame: improve diagnosis for "--reverse NEW"Junio C Hamano, Jun 14, 2016
  2. blame: improve diagnosis for "--reverse NEW"Junio C Hamano, Jun 14, 2016
  3. blame: dwim "blame --reverse OLD" as "blame --reverse OLD.."Junio C Hamano, Jun 14, 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.