The output of `git log` is not exactly in chronological order. The
default sort option (--date-order) is described in the man page as
follows:
Show no parents before all of its children are shown, but otherwise
show commits in the commit timestamp order.
The `uniq` program will only remove duplicate lines if they follow each
other. In order for this to work correctly, we need to ensure that the
list of dates is exactly in chronological order. There doesn't seem to
be a `git log` option to achieve this, but we can use the `sort`
program. I used reverse sort (`sort -r`) since the output will be roughly
reverse-sorted already.
It's also worth noting that the default --date-order option sorts by
commit date, but git-summary uses *author* date (%ai). Passing
--author-date-order doesn't fix this issue, though, so I didn't change
that.
At the time of writing, this change reduces the number of 'active days'
for git-extras.git from 367 to 331.
git-summary correctly displays project name when not executed in the top
level directory of a repository. Fixestj/git-extras#302.
Uses the git-sh-setup script to find top level directory and then uses
that directory name for the project name.
This allows you to ask for a git summary based on a commitish, which is
very useful if you have a lot of project history. For example, if you
want a summary since the tag v42
$ git summary v42..