Skip to content

Commit 2a14cf5

Browse files
committed
scripts/retire.sh: find the latest commit that added a committer
Otherwise, a committer that is removed and then added again may be proposed for retirement within the first year of their new tenure. This also fixes an interaction between `-o pipefail` and `SIGPIPE` that seems to reproduce in local tests on both Darwin and Linux for me, but somehow hasn’t been affecting CI.
1 parent 86bfeed commit 2a14cf5

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

scripts/retire.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,16 @@ cd "$DIR"
5959
for login in *; do
6060

6161
# Figure out when this person received the commit bit
62-
# Get the unix epoch of the first commit that touched this file
62+
# Get the unix epoch of the last commit that added this file
6363
# --first-parent is important to get the time of when the main branch was changed
64-
fileCommitEpoch=$(git log --reverse --first-parent --format=%cd --date=unix -- "$login" | head -1)
64+
fileCommitEpoch=$(git log \
65+
--first-parent \
66+
--no-follow \
67+
--diff-filter=A \
68+
--max-count=1 \
69+
--format=%cd \
70+
--date=unix \
71+
-- "$login")
6572
if (( fileCommitEpoch < createdOnReceptionEpoch )); then
6673
# If it was created before creation actually matched the reception date
6774
# This branch can be removed after 2026-04-23

0 commit comments

Comments
 (0)