diff --git a/revision.c b/revision.c index 6603af9444..08d5806b8a 100644 --- a/revision.c +++ b/revision.c @@ -1168,6 +1168,7 @@ static void init_all_refs_cb(struct all_refs_cb *cb, struct rev_info *revs, { cb->all_revs = revs; cb->all_flags = flags; + revs->rev_input_given = 1; } void clear_ref_exclusion(struct string_list **ref_excludes_p) diff --git a/revision.h b/revision.h index f96e7f7f49..bc18487d6f 100644 --- a/revision.h +++ b/revision.h @@ -71,6 +71,13 @@ struct rev_info { const char *def; struct pathspec prune_data; + /* + * Whether the arguments parsed by setup_revisions() included any + * "input" revisions that might still have yielded an empty pending + * list (e.g., patterns like "--all" or "--glob"). + */ + int rev_input_given; + /* topo-sort */ enum rev_sort_order sort_order;