Re: [PATCH] --count feature for git shortlog
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 3, 2015, 17:31 UTC
- Message-ID
- <xmqqfv555es7.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <20150630122323.GY18226@serenity.lan>
John Keeping <john@keeping.me.uk> writes:
Show 15 quoted lines
> On Tue, Jun 30, 2015 at 02:10:49PM +0200, Johannes Schindelin wrote: >> On 2015-06-29 18:46, Lawrence Siebert wrote: >> >> > I appreciate your help. Okay, That all makes sense. >> > >> > I would note that something like: >> > git shortlog -s "$FILENAME: | cut -f 1 | paste -sd+ - | bc >> > >> > seems like it run much faster then: >> > >> > git log --oneline "$FILENAME" | wc -l >> >> How does it compare to `git rev-list -- "$FILENAME" | wc -l`? > > Or even `git rev-list --count HEAD -- "$FILENAME"`.
Ahh, OK. I didn't know we already had "rev-list --count".
Then please disregard the suggestion to add the option to "log"; it still holds true that the option does not belong to "shortlog", but I do think "how many changes were made to this path" statistics driven by a script should use "rev-list" plumbing, and if it already has "--count" option, that is perfect ;-)
Thanks.