diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-06-25 22:22:40 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-06-25 22:22:40 +0200 |
commit | 208ee598612092da892ac1c0e8dd0d4e09c4f076 (patch) | |
tree | 014cf9a074e670f54a601ec2a6eb007b7555c068 /shallow.c | |
parent | Merge branch 'ls/complete-remote-update-names' (diff) | |
parent | upload-pack: reject shallow requests that would return nothing (diff) | |
download | git-208ee598612092da892ac1c0e8dd0d4e09c4f076.tar.xz git-208ee598612092da892ac1c0e8dd0d4e09c4f076.zip |
Merge branch 'nd/reject-empty-shallow-request'
"git fetch --shallow-since=<cutoff>" that specifies the cut-off
point that is newer than the existing history used to end up
grabbing the entire history. Such a request now errors out.
* nd/reject-empty-shallow-request:
upload-pack: reject shallow requests that would return nothing
Diffstat (limited to 'shallow.c')
-rw-r--r-- | shallow.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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, ¬_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; |