Web lists-archives.com

Re: [PATCH 0/4] handling empty inputs in the revision machinery




Jeff King <peff@xxxxxxxx> writes:

> I noticed that:
>
>   git log --tags=does-not-exist
>
> will show all of HEAD, which is rather confusing. This fixes it, and
> also hits several other cases that were marked as expect_failure for
> rev-list. There is one case it doesn't handle: --stdin. It's not clear
> to me what the right behavior is there. I'll follow up with more
> discussion.

Naïvely, I would expect that an empty input from --stdin should
still prevent us from defaulting to "HEAD", just like --glob=* and
friends should do.  Perhaps there are conter-example scenarios I
haven't thought of..

Thanks.


>
>   [1/4]: t6018: flesh out empty input/output rev-list tests
>   [2/4]: revision: add rev_input_given flag
>   [3/4]: rev-list: don't show usage when we see empty ref patterns
>   [4/4]: revision: do not fallback to default when rev_input_given is set
>
>  builtin/rev-list.c       |  3 ++-
>  revision.c               |  3 ++-
>  revision.h               |  7 +++++++
>  t/t4202-log.sh           |  6 ++++++
>  t/t6018-rev-list-glob.sh | 20 +++++++++-----------
>  5 files changed, 26 insertions(+), 13 deletions(-)
>
> -Peff