Re: Make "git log --count" work like "git rev-list"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 10, 2019 at 02:19:51PM -0800, Junio C Hamano wrote:

> > 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().

Interesting idea. I think it might end up creating weird inconsistencies
for other cases, though (e.g., log respecting config like log.showroot
that rev-list does not).

I suppose it depends on whether we want to advertise that "log --count"
is just a convenience wrapper for "rev-list --count". Personally, that
sounds hacky to me. I'd expect "log --count <options>" to give the same
answer as "log --oneline <options> | wc -l".

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux