summaryrefslogtreecommitdiff
path: root/setup.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-08-22 11:51:53 -0700
committerJunio C Hamano <gitster@pobox.com>2012-08-22 11:51:53 -0700
commit64336ebe3413e07dcf9e0bcaba93884caab8d65d (patch)
tree8d32558d72b7b36d2788aefe39228f1b6d7aee3a /setup.c
parent4692f32ddfb6a633c83d6a731f5a8cfbea218e7c (diff)
parent4d4b573977833f887635be386b84681e73834b72 (diff)
downloadgit-64336ebe3413e07dcf9e0bcaba93884caab8d65d.tar.gz
Merge branch 'mm/die-with-dashdash-help'
When the user gives an argument that can be taken as both a revision name and a pathname without disambiguating with "--", we used to give a help message "Use '--' to separate". The message has been clarified to show where that '--' goes on the command line. * mm/die-with-dashdash-help: setup: clarify error messages for file/revisions ambiguity
Diffstat (limited to 'setup.c')
-rw-r--r--setup.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/setup.c b/setup.c
index 9139beefc7..3a1b2fd455 100644
--- a/setup.c
+++ b/setup.c
@@ -79,7 +79,7 @@ static void NORETURN die_verify_filename(const char *prefix,
{
if (!diagnose_misspelt_rev)
die("%s: no such path in the working tree.\n"
- "Use '-- <path>...' to specify paths that do not exist locally.",
+ "Use 'git <command> -- <path>...' to specify paths that do not exist locally.",
arg);
/*
* Saying "'(icase)foo' does not exist in the index" when the
@@ -92,7 +92,8 @@ static void NORETURN die_verify_filename(const char *prefix,
/* ... or fall back the most general message. */
die("ambiguous argument '%s': unknown revision or path not in the working tree.\n"
- "Use '--' to separate paths from revisions", arg);
+ "Use '--' to separate paths from revisions, like this:\n"
+ "'git <command> [<revision>...] -- [<file>...]'", arg);
}
@@ -141,7 +142,8 @@ void verify_non_filename(const char *prefix, const char *arg)
if (!check_filename(prefix, arg))
return;
die("ambiguous argument '%s': both revision and filename\n"
- "Use '--' to separate filenames from revisions", arg);
+ "Use '--' to separate paths from revisions, like this:\n"
+ "'git <command> [<revision>...] -- [<file>...]'", arg);
}
/*