revision: do not fallback to default when rev_input_given is set
authorJeff King <peff@peff.net>
Wed, 2 Aug 2017 22:30:19 +0000 (18:30 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 2 Aug 2017 22:45:22 +0000 (15:45 -0700)
commit5d34d1ac06fe70fc0a7a8f35ddf9e7690114dda7
treecaa5584f37f25395ae4121fe660cc3e9a290db56
parent0159ba3226f75fbd6d3dc0e92c325cb11f2f0699
revision: do not fallback to default when rev_input_given is set

If revs->def is set (as it is in "git log") and there are no
pending objects after parsing the user's input, then we show
whatever is in "def". But if the user _did_ ask for some
input that just happened to be empty (e.g., "--glob" that
does not match anything), showing the default revision is
confusing. We should just show nothing, as that is what the
user's request yielded.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
revision.c
t/t4202-log.sh