diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-08-11 13:27:07 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-11 13:27:07 -0700 |
commit | 8fbaf0b13bc54819445f613e917c44ea52eef804 (patch) | |
tree | 9f02a6c5723b33fd6249d36a9573079560601e69 /revision.c | |
parent | 9c1259a0da0cb37f4bf8926b162ccb73203589e1 (diff) | |
parent | 5d34d1ac06fe70fc0a7a8f35ddf9e7690114dda7 (diff) | |
download | git-8fbaf0b13bc54819445f613e917c44ea52eef804.tar.gz |
Merge branch 'jk/rev-list-empty-input'
"git log --tag=no-such-tag" showed log starting from HEAD, which
has been fixed---it now shows nothing.
* jk/rev-list-empty-input:
revision: do not fallback to default when rev_input_given is set
rev-list: don't show usage when we see empty ref patterns
revision: add rev_input_given flag
t6018: flesh out empty input/output rev-list tests
Diffstat (limited to 'revision.c')
-rw-r--r-- | revision.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/revision.c b/revision.c index ab4af0c352..aa3b946a8d 100644 --- a/revision.c +++ b/revision.c @@ -1166,6 +1166,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) @@ -2313,7 +2314,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s opt->tweak(revs, opt); if (revs->show_merge) prepare_show_merge(revs); - if (revs->def && !revs->pending.nr && !got_rev_arg) { + if (revs->def && !revs->pending.nr && !revs->rev_input_given && !got_rev_arg) { struct object_id oid; struct object *object; struct object_context oc; |