Merge branch 'sg/gpg-tests-fix'
[gitweb.git] / shallow.c
index 2abebeb8c857067315cf79b96dbba6b26a69a076..79439a818f52d5c783fbf003a7b9fa90bb0d1993 100644 (file)
--- a/shallow.c
+++ b/shallow.c
@@ -191,6 +191,9 @@ struct commit_list *get_shallow_commits_by_rev_list(int ac, const char **av,
                die("revision walk setup failed");
        traverse_commit_list(&revs, show_commit, NULL, &not_shallow_list);
 
+       if (!not_shallow_list)
+               die("no commits selected for shallow requests");
+
        /* Mark all reachable commits as NOT_SHALLOW */
        for (p = not_shallow_list; p; p = p->next)
                p->item->object.flags |= not_shallow_flag;