list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Stefan Beller <>
To: Linus Torvalds <>
Cc: Junio Hamano C <>,
	Git List Mailing <>
Subject: Re: Make "git log --count" work like "git rev-list"
Date: Wed, 9 Jan 2019 09:21:31 -0800	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Sat, Jan 5, 2019 at 2:47 PM Linus Torvalds
<> wrote:
> This is a ridiculous patch. And I understand entirely if nobody else
> cares, because I don't think anybody else has ever even noticed.
> It turns out that I still use "git rev-list" outside of some hard-core
> scripting for one silly reason: the linux-next statistics are all
> about non-merge commits, and so to do a rough comparison with
> linux-next, I do
>         git rev-list --count --no-merges v4.20..
> to get an approximate idea of how much I've merged compared to what is
> in linux-next.
> (See also
> for the graphical view of it all, even though it looks a bit odd right
> now because of how linux-next wasn't being updated over the holidats
> and right at the 4.19 release).
> Anyway, I've occasionally thought to myself that I should just fix
> "git log" to learn that too, so that I wouldn't have to type out "git
> rev-list". Because "git log" does actually take the "--count"
> argument, it just doesn't honor it.
> This is that patch.

Sounds reasonable to me to have such functionality,
as I tend to use
  git log --oneline origin/master..origin/next --no-merges |wc -l
for such queries, which I always assume to be doing useless
work as I'd be interested in *only* the count, and not the
intermediate oneline output, but that is the best output
that wc works on.

So maybe the --count option would want to suppress
other output if given (or we'd want to have another option
for no output)?

Instead of printing, do we want to redirect to
rev->diffopt.file, or send it through the diff codes
buffer if we ever anticipate needing this output in

A test would be nice, too.


  reply	other threads:[~2019-01-09 17:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-05 22:46 Linus Torvalds
2019-01-09 17:21 ` Stefan Beller [this message]
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
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:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \
    --subject='Re: Make "git log --count" work like "git rev-list"' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ \
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
 note: .onion URLs require Tor:

code repositories for project(s) associated with this inbox:

AGPL code for this site: git clone