Subject: Re: How to determine the number of unique recent committers on a branch?

From: Junio C Hamano <[email-masked]>
Date: Wed, 23 Mar 2022 13:48:12 -0700

Sebastian Schuberth <[email-masked]> writes:

> I'm trying to determine the number of unique committers who have
> recently committed to a branch. "Recently" should be configurable, but
> for my example I'll use a period of 3 months.
>
> At first, I thought the [<refname>]@{<date>} syntax [1] in conjunction
> with git "shortlog -s" could be helpful here, like
>
> $ git shortlog -s main@{3.months.ago} | wc -l

As reflog is pretty much the local matter, this is "find out the
commit _I_ happened to have seen at the tip of 'main' in _this_
repository 3 months ago, and count all commits before that one".

If you were taking 6 months sabbatical, not fetching the repository
during that time, and then you fetched to become up to date with the
upstream, you may have had a copy of the shared project history only
as of 6 months ago with that notation, even though the syntax is
asking for "3 months ago", simply because that was the commit your
repository had 3 months ago at the tip of the branch.

    $ git log --until=3.months.ago

would instead look at the timestamp recorded in commit objects,
which would probably be more relevant to project participants.