From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Git List Mailing <git@vger.kernel.org>
Subject: Re: Make "git log --count" work like "git rev-list"
Date: Thu, 10 Jan 2019 14:19:51 -0800 [thread overview]
Message-ID: <xmqq5zuw17g8.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20190109195428.GA12645@sigill.intra.peff.net> (Jeff King's message of "Wed, 9 Jan 2019 14:54:28 -0500")
Jeff King <peff@peff.net> writes:
> But does this catch all of the limiting that git-log would do? I notice
> that it happens before the call to log_tree_diff(), which conditionally
> returns a "shown" flag. So you get weird results with some options. For
> example:
>
> # works, because pathspec limiting happens early
> git log --count builtin/log.c
>
> # doesn't work, because --follow disables pruning
> git log --follow --count builtin/log.c
Well, that's a bad one.
> I know "--follow" is a bit hacky in general, but I think there are other
> cases where log_tree_diff() may decide not to show a commit (maybe
> without --root, though I guess that's the default these days).
>
> I dunno. Certainly respecting "--count" even for the simple cases is an
> improvement over the status quo. Maybe it would be enough to give a
> warning in the manpage that it may not work with exotic options.
Hmph, perhaps. I wonder if it is easy enough to redirect the entire
codeflow to that of rev-list when we see --count in cmd_log().
next prev parent reply other threads:[~2019-01-10 22:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-05 22:46 Make "git log --count" work like "git rev-list" Linus Torvalds
2019-01-09 17:21 ` Stefan Beller
2019-01-09 17:44 ` Linus Torvalds
2019-01-09 19:54 ` Jeff King
2019-01-09 20:14 ` Stefan Beller
2019-01-10 22:19 ` Junio C Hamano [this message]
2019-01-11 15:35 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq5zuw17g8.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).