]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Meta/Count: count the commits on integration branches
authorJunio C Hamano <gitster@pobox.com>
Wed, 3 Aug 2022 23:57:50 +0000 (16:57 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 3 Aug 2022 23:57:50 +0000 (16:57 -0700)
Count [new file with mode: 0755]

diff --git a/Count b/Count
new file mode 100755 (executable)
index 0000000..5a73cad
--- /dev/null
+++ b/Count
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+: ${asof=${1-now}}
+
+lasttag=$(
+       git tag --list 'v*.0' --sort=version:tag | tail -n 1
+) &&
+for r in "$lasttag..master@{$asof}" \
+       "master@{$asof}..next@{$asof}" \
+       "master@{$asof}..seen@{$asof}"
+do
+       echo "$r        $(git rev-list --count --no-merges $r)"
+done