diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-06-28 15:19:31 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-06-28 15:19:32 -0700 |
commit | 08080894b7bd68db413275e601286d94b40752bd (patch) | |
tree | 4541a9e47013b90380d18111c97df65d138aaf8b /builtin | |
parent | Merge branch 'jk/diff-no-index-pager' (diff) | |
parent | verify_filename(): ask the caller to chose the kind of diagnosis (diff) | |
download | tgif-08080894b7bd68db413275e601286d94b40752bd.tar.xz |
Merge branch 'mm/verify-filename-fix'
"git diff COPYING HEAD:COPYING" gave a nonsense error message that
claimed that the treeish HEAD did not have COPYING in it.
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/grep.c | 2 | ||||
-rw-r--r-- | builtin/reset.c | 2 | ||||
-rw-r--r-- | builtin/rev-parse.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/builtin/grep.c b/builtin/grep.c index fe1726f5ef..29adb0ac93 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -928,7 +928,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix) if (!seen_dashdash) { int j; for (j = i; j < argc; j++) - verify_filename(prefix, argv[j]); + verify_filename(prefix, argv[j], j == i); } paths = get_pathspec(prefix, argv + i); diff --git a/builtin/reset.c b/builtin/reset.c index 8c2c1d52a2..4cc34c9084 100644 --- a/builtin/reset.c +++ b/builtin/reset.c @@ -285,7 +285,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix) rev = argv[i++]; } else { /* Otherwise we treat this as a filename */ - verify_filename(prefix, argv[i]); + verify_filename(prefix, argv[i], 1); } } diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c index 733f626f6c..13495b88f5 100644 --- a/builtin/rev-parse.c +++ b/builtin/rev-parse.c @@ -486,7 +486,7 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix) if (as_is) { if (show_file(arg) && as_is < 2) - verify_filename(prefix, arg); + verify_filename(prefix, arg, 0); continue; } if (!strcmp(arg,"-n")) { @@ -734,7 +734,7 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix) as_is = 1; if (!show_file(arg)) continue; - verify_filename(prefix, arg); + verify_filename(prefix, arg, 1); } if (verify) { if (revs_count == 1) { |