X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=builtin%2Fls-tree.c;h=f73e6bd9626a0e929a513fed1fd1227c28732ec7;hb=385cc9d8c44eb5be9d57e630129752a72c0a08c8;hp=dc86b0d9a997f98ad43ca2897055a92b8a3eb7d0;hpb=5977744d045cacb809a3e3630dbbd28fe83976ae;p=git.git diff --git a/builtin/ls-tree.c b/builtin/ls-tree.c index dc86b0d9a..f73e6bd96 100644 --- a/builtin/ls-tree.c +++ b/builtin/ls-tree.c @@ -24,7 +24,7 @@ static int chomp_prefix; static const char *ls_tree_prefix; static const char * const ls_tree_usage[] = { - "git ls-tree [] [path...]", + "git ls-tree [] [...]", NULL }; @@ -52,6 +52,8 @@ static int show_recursive(const char *base, int baselen, const char *pathname) speclen = strlen(spec); if (speclen <= len) continue; + if (spec[len] && spec[len] != '/') + continue; if (memcmp(pathname, spec, len)) continue; return 1;