summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-06-14 10:46:06 -0700
committerJunio C Hamano <gitster@pobox.com>2016-06-14 12:12:15 -0700
commitd993ce1ed2f025708b0f78bed241466e35f1e8a0 (patch)
treeb5fcc45707d598f83f00b93474ec44e41a1ff271
parent0b65a8dbdb38962e700ee16776a3042beb489060 (diff)
downloadgit-d993ce1ed2f025708b0f78bed241466e35f1e8a0.tar.gz
blame: improve diagnosis for "--reverse NEW"
"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 develops 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>
-rw-r--r--Documentation/git-blame.txt2
-rw-r--r--builtin/blame.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/Documentation/git-blame.txt b/Documentation/git-blame.txt
index ba5417567c..16323eb80e 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 21f42b0b62..a027b8a607 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -2466,14 +2466,14 @@ static char *prepare_initial(struct scoreboard *sb)
if (obj->type != OBJ_COMMIT)
die("Non commit %s?", revs->pending.objects[i].name);
if (sb->final)
- die("More than one commit to dig down to %s and %s?",
+ die("More than one commit to dig up from, %s and %s?",
revs->pending.objects[i].name,
final_commit_name);
sb->final = (struct commit *) obj;
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);
}