summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-09-10 22:24:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-09-10 22:24:21 (GMT)
commit5f9d8e3572e507fec9047fbfc216821d23b42881 (patch)
tree7605fa3e2ffd820a397b4c578850098411e5ca0d
parent3d4003bdc78095efce99149c0e6967f55edf8c53 (diff)
parent4d4b573977833f887635be386b84681e73834b72 (diff)
downloadgit-5f9d8e3572e507fec9047fbfc216821d23b42881.zip
git-5f9d8e3572e507fec9047fbfc216821d23b42881.tar.gz
git-5f9d8e3572e507fec9047fbfc216821d23b42881.tar.bz2
Merge branch 'mm/die-with-dashdash-help' into maint-1.7.11
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
-rw-r--r--setup.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/setup.c b/setup.c
index e114977..7663a4c 100644
--- a/setup.c
+++ b/setup.c
@@ -82,7 +82,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
@@ -96,7 +96,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);
}
@@ -145,7 +146,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);
}
/*