summaryrefslogtreecommitdiff
path: root/builtin/rev-list.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2018-09-17 13:53:48 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-09-17 13:53:48 -0700
commit8b6f6075befc935faa3330ee467e537694ac1d32 (patch)
treed686d1da77d63df83acb6f5ac4bbea7cbd066a56 /builtin/rev-list.c
parentMerge branch 'bp/checkout-new-branch-optim' (diff)
parentrev-list: make empty --stdin not an error (diff)
downloadtgif-8b6f6075befc935faa3330ee467e537694ac1d32.tar.xz
Merge branch 'jk/rev-list-stdin-noop-is-ok'
"git rev-list --stdin </dev/null" used to be an error; it now shows no output without an error. "git rev-list --stdin --default HEAD" still falls back to the given default when nothing is given on the standard input. * jk/rev-list-stdin-noop-is-ok: rev-list: make empty --stdin not an error
Diffstat (limited to 'builtin/rev-list.c')
-rw-r--r--builtin/rev-list.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/rev-list.c b/builtin/rev-list.c
index 5b07f3f4a2..ed0ea7dc5b 100644
--- a/builtin/rev-list.c
+++ b/builtin/rev-list.c
@@ -493,7 +493,7 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
if ((!revs.commits && reflog_walk_empty(revs.reflog_info) &&
(!(revs.tag_objects || revs.tree_objects || revs.blob_objects) &&
!revs.pending.nr) &&
- !revs.rev_input_given) ||
+ !revs.rev_input_given && !revs.read_from_stdin) ||
revs.diff)
usage(rev_list_usage);