ls-tree: chomp leading directories when run from a subdirectory
[gitweb.git] / rev-list.c
index 8020d974f2fc84d477920bd10ea450c44fce0a77..d0609666a1c5732aa9bc9359d70fd3cf65555c29 100644 (file)
@@ -850,7 +850,8 @@ int main(int argc, const char **argv)
                handle_one_commit(commit, &list);
        }
 
-       if (!list)
+       if (!list &&
+           (!(tag_objects||tree_objects||blob_objects) && !pending_objects))
                usage(rev_list_usage);
 
        paths = get_pathspec(prefix, argv + i);