git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to determine the number of unique recent committers on a branch?
@ 2022-03-23 10:23 Sebastian Schuberth
  2022-03-23 12:30 ` Ævar Arnfjörð Bjarmason
  2022-03-23 20:48 ` Junio C Hamano
  0 siblings, 2 replies; 6+ messages in thread
From: Sebastian Schuberth @ 2022-03-23 10:23 UTC (permalink / raw)
  To: Git Mailing List

Hi,

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

But then I realized that just like with the --since option, the <date>
counts relative to the current date, not relative to the date of the
last commit on the given branch. To me, that's rather counterintuitive
for the [<refname>]@{<date>} syntax.

So, what would be a good way to achieve what I want with only
Git-means (and maybe `wc`), but without any awk / Perl scripting
magic?

Thanks in advance!

[1]: http://git-scm.com/docs/gitrevisions#Documentation/gitrevisions.txt-emltrefnamegtltdategtemegemmasteryesterdayememHEAD5minutesagoem

-- 
Sebastian Schuberth

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-03-23 22:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).