Re: "git shortlog -sn --follow -- <path>" counts all commits to entire repo
- From
Stefan Beller <sbeller@google.com>
- Date
- Sep 7, 2017, 19:30 UTC
- Message-ID
- <CAGZ79kZAeCERKn6he2LzAj97BXEJ5U+Fy4sorAPNmW_XaCS9Vg@mail.gmail.com>
- In-Reply-To
- <CAJrPYn8_n1JD3hL1LSAVz2Khs=dZRVaZ-gpru5AV+ottv5WfAw@mail.gmail.com>
On Thu, Sep 7, 2017 at 11:13 AM, Валентин <valiko.ua@gmail.com> wrote:
Show 17 quoted lines
> Hi, > > I'll be short as shortlog :) > > "git shortlog -sn -- <path>" > counts all commits to the specified path, as expected. > > "git shortlog -sn --follow -- <path>" > counts all commits to the entire repo, which looks like a bug. > > "--follow" switch is not listed on > https://git-scm.com/docs/git-shortlog so maybe it's not supported. In > this case I would expect error message. > > Tried the following versions: > "git version 2.14.1.windows.1" on Windows 7 > "git version 2.7.4" on Ubuntu 16.04
The shortlog takes most (all?) options that git-log does, e.g. in git.git:
$ git shortlog -sne --author=Peter
74 Peter Krefting <peter@softwolves.pp.se>
43 H. Peter Anvin <hpa@zytor.com>
23 Peter Eriksen <s022018@student.dtu.dk>
7 Peter Hagervall <hager@cs.umu.se>
6 Peter Collingbourne <peter@pcc.me.uk>
4 Peter Baumann <waste.manager@gmx.de>
3 Peter Oberndorfer <kumbayo84@arcor.de>
3 Peter Valdemar Mørch <peter@morch.com>
2 Peter Colberg <peter@colberg.org>
2 Peter Eisentraut <peter@eisentraut.org>
2 Peter Harris <git@peter.is-a-geek.org>
2 Peter van der Does <peter@avirtualhome.com>
1 Peter Hutterer <peter.hutterer@who-t.net>
1 Peter Law <PeterJCLaw@gmail.com>
1 Peter Stuge <peter@stuge.se>
1 Peter Wu <lekensteyn@gmail.com>
1 Peter van Zetten <peter.van.zetten@cgi.com>Maybe we'd to state in the man page explicitly that shortlog is part of the log family hence taking all log related options.
Thanks, Stefan