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.
This commit is contained in:
Junio C Hamano
2012-06-28 15:19:31 -07:00
8 changed files with 44 additions and 10 deletions

View File

@ -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) {