All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Sebastian Schuberth <sschuberth@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: How to determine the number of unique recent committers on a branch?
Date: Wed, 23 Mar 2022 13:48:12 -0700	[thread overview]
Message-ID: <xmqqy210qttf.fsf@gitster.g> (raw)
In-Reply-To: <CAHGBnuPavzr_gq0ake6bOQETmHBnU2XOWdDz-UtkBP_+rRdYfA@mail.gmail.com> (Sebastian Schuberth's message of "Wed, 23 Mar 2022 11:23:07 +0100")

Sebastian Schuberth <sschuberth@gmail.com> 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.

      parent reply	other threads:[~2022-03-23 20:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-23 10:23 How to determine the number of unique recent committers on a branch? Sebastian Schuberth
2022-03-23 12:30 ` Ævar Arnfjörð Bjarmason
2022-03-23 13:00   ` Sebastian Schuberth
2022-03-23 14:47     ` Ævar Arnfjörð Bjarmason
2022-03-23 22:14       ` Sebastian Schuberth
2022-03-23 20:48 ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqy210qttf.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=sschuberth@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.