diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-09-10 10:02:48 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-09-10 10:02:48 +0200 |
commit | c2a3bb47f0a5cf8537b3d79cd01b11a5726afb02 (patch) | |
tree | 1d72a5999d2b0905b6878dd0ac64cc6928ed32f3 /revision.c | |
parent | Merge branch 'st/lib-gpg-kill-stray-agent' into maint (diff) | |
parent | revision: do not fallback to default when rev_input_given is set (diff) | |
download | git-c2a3bb47f0a5cf8537b3d79cd01b11a5726afb02.tar.xz git-c2a3bb47f0a5cf8537b3d79cd01b11a5726afb02.zip |
Merge branch 'jk/rev-list-empty-input' into maint
"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 2631b013a5..f032ab2e5c 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; |