Hello Guix!
Following on the theme of patch review, I did some stats with
the
attached tools on commits since 1.3.0:
• 20,489 commits were made since then;
• 4,476 were commits pushed on behalf of a non-committer;
• of these, half were pushed by 2 committers, out of 40ish.
Some conclusions we can draw:
• We have a strong core development team, which I think is
great
compared to many free software projects.
Perhaps the flip side of this is that we make too little
space to
newcomers. (I feel we’re almost the opposite of a typical
Git{Hub,Lab}-hosted project where drive-by contributions are
common
and long-term commitment is rare.)
• Review work is severely lacking. The manual reads (info
"(guix)
Commit Access"):
[…] the project keeps moving forward because committers
not only push
their own awesome changes, but also offer some of their
time
_reviewing_ and pushing other people’s changes. As a
committer,
you’re welcome to use your expertise and commit rights to
help
other contributors, too!
Yet, most committers don’t allocate time to review and push
other
people’s changes.
Why aren’t we, committers, not doing more review/apply work?
Is it
too intimidating? Would having a documented review
checklist help?
If you’re not using Emacs, what actionable steps should we
take with
mumi and other tools to help you (Arun made several
proposals in
their Guix Days talk)? If you are using Emacs, does
debbugs.el have
shortcomings that make it a problem to review patches?
• We need to be able to renew committers. There’s a process
in place
to remove, at least temporarily, committers that have been
inactive
for a year or more, and I think it’s good (info "(guix)
Commit
Access").
Maybe we should also encourage committers who have “moved
on” to let
the project know so we have a clearer picture of who’s
in—meaning
available not just to commit their own occasional patches,
but also
to help other contributors.
In addition to that, we need to encourage contributors who
are not
committers yet, which obviously means reviewing and applying
their
contributions in a timely fashion. We need to grow prolific
contributors into leadership positions to they can become
committers
and take part into this whole process.
In short, we need to break out of a potentially vicious circle
where
active members don’t make the work that would allow newcomers to
get
more involved, at the risk of burning out themselves.
Let’s make sure this project keeps striving for decades to come!
:-)
Thoughts?
Ludo’.
(use-modules (git)
(git repository)
(git reference)
(git oid)
(git tag)
(git commit)
(git structs)
;signature-email, etc.
(guix git)
(srfi srfi-1)
(srfi srfi-26)
(ice-9 match)
(ice-9 vlist))
(define commit-author*
(compose signature-name commit-author))
(define commit-committer*
(compose signature-name commit-committer))
(define-syntax-rule (false-if-git-error exp)
(catch 'git-error
(lambda () exp)
(const #f)))
(define* (fold-commits proc seed repo
#:key
(start (reference-target
(repository-head repo)))
end)
"Call PROC on each commit of REPO, starting at START (an OID),
and until
END if specified."
(let loop ((commit (commit-lookup repo start))
(result seed))
(let ((parent (false-if-git-error (commit-parent commit))))
(if parent
(if (and end (oid=? (commit-id parent) end))
(proc parent result)
(loop parent (proc parent result)))
result))))
(define (reviewers repo commits)
"Return a list of review count/committer pairs."
(define vhash
(fold (lambda (commit result)
(if (string=? (commit-author* commit)
(commit-committer* commit))
result
(vhash-cons (commit-committer* commit) #t
result)))
vlist-null
commits))
(define committers
(delete-duplicates
(fold-commits (lambda (commit result)
(cons (commit-committer* commit)
result))
'()
repo)))
(map (lambda (committer)
(cons (vhash-fold* (lambda (_ count)
(+ 1 count))
0
committer
vhash)
committer))
committers))
(define (reviewer< r1 r2)
(match r1
((count1 . name1)
(match r2
((count2 . name2)
(< count1 count2))))))
(define repo
(repository-open "."))
(define commits
(commit-difference (commit-lookup repo
(reference-target
(repository-head repo)))
(commit-lookup
repo
(tag-target-id
(tag-lookup
repo
(reference-target
(reference-lookup repo
"refs/tags/v1.3.0")))))))