Re: [PATCH] --count feature for git shortlog

2015-07-21 Thread Jakub Narębski
Lawrence Siebert wrote: On Fri, Jul 3, 2015 at 10:31 AM, Junio C Hamano gits...@pobox.com wrote: John Keeping j...@keeping.me.uk writes: 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

Re: [PATCH] --count feature for git shortlog

2015-07-03 Thread Junio C Hamano
John Keeping j...@keeping.me.uk writes: 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 |

Re: [PATCH] --count feature for git shortlog

2015-07-03 Thread Lawrence Siebert
On Fri, Jul 3, 2015 at 10:31 AM, Junio C Hamano gits...@pobox.com wrote: John Keeping j...@keeping.me.uk writes: 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

Re: [PATCH] --count feature for git shortlog

2015-07-01 Thread Jeff King
On Tue, Jun 30, 2015 at 08:00:53PM -0700, Lawrence Siebert wrote: The following doesn't currently run: `git rev-list --count --use-bitmap-index HEAD` This is an optional parameter for rev-list from commit aa32939fea9c8934b41efce56015732fa12b8247 which can't currently be used because of

Re: [PATCH] --count feature for git shortlog

2015-07-01 Thread Junio C Hamano
Jeff King p...@peff.net writes: Note that this would not work with, say: git rev-list --use-bitmap-index --count HEAD -- Makefile as the bitmap index does not have enough information to do path limiting (we should probably disallow this or fall back to the non-bitmap code path, but right

Re: [PATCH] --count feature for git shortlog

2015-06-30 Thread Lawrence Siebert
Vincent, I'm ccing you because of --use-bitmap-index John, Johannes, I really appreciate both your thoughts. `git rev-list --count HEAD -- $FILENAME` runs noticeably faster then my patch code for `git shortlog --count`, git shortlog -s $FILENAME | cut -f 1 | paste -sd+ -|bc, and faster than any

Re: [PATCH] --count feature for git shortlog

2015-06-30 Thread John Keeping
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

Re: [PATCH] --count feature for git shortlog

2015-06-30 Thread Johannes Schindelin
Hi Lawrence, 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

Re: [PATCH] --count feature for git shortlog

2015-06-29 Thread Lawrence Siebert
Junio, 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 Which was why I was looking at shortlog. I was using it to sort

Re: [PATCH] --count feature for git shortlog

2015-06-29 Thread Junio C Hamano
Lawrence Siebert lawrencesieb...@gmail.com writes: I was using it to sort files by commit count when provided a list of files, which git rev-list doesn't really work for. What makes you say rev-list does not work (perhaps 'really' is the key word there?) git rev-list --no-merges

Re: [PATCH] --count feature for git shortlog

2015-06-29 Thread Lawrence Siebert
My apologies, I misunderstood and thought rev-list didn't take filenames. Lawrence Siebert On Mon, Jun 29, 2015 at 10:04 AM, Junio C Hamano gits...@pobox.com wrote: Lawrence Siebert lawrencesieb...@gmail.com writes: I was using it to sort files by commit count when provided a list of files,

[PATCH] --count feature for git shortlog

2015-06-28 Thread Lawrence Siebert
Signed-off-by: Lawrence Siebert lawrencesieb...@gmail.com --- t/t4201-shortlog.sh | 5 + 1 file changed, 5 insertions(+) diff --git a/t/t4201-shortlog.sh b/t/t4201-shortlog.sh index 7600a3e..33ecb4a 100755 --- a/t/t4201-shortlog.sh +++ b/t/t4201-shortlog.sh @@ -194,4 +194,9 @@

[PATCH] --count feature for git shortlog

2015-06-28 Thread Lawrence Siebert
--summary is per author --count counts all Signed-off-by: Lawrence Siebert lawrencesieb...@gmail.com --- builtin/shortlog.c | 14 +- shortlog.h | 1 + 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/builtin/shortlog.c b/builtin/shortlog.c index

[PATCH] --count feature for git shortlog

2015-06-28 Thread Lawrence Siebert
This is a new feature for short log, which lets you count commits on a per file or repository basis easily. Currently if you want a total count of commits with shortlog, you would need to add up each authors commits after using --summary. This adds a -N / --count option to shortlog for this

Re: [PATCH] --count feature for git shortlog

2015-06-28 Thread Junio C Hamano
Lawrence Siebert lawrencesieb...@gmail.com writes: This is a new feature for short log, which lets you count commits on a per file or repository basis easily. Currently if you want a total count of commits with shortlog, you would need to add up each authors commits after using --summary.