NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.32k stars 13.56k forks source link

Documentation: gitting started guide & policy #324945

Open eclairevoyant opened 2 months ago

eclairevoyant commented 2 months ago

Problem

Currently we expect contributors to follow a git rebase flow and label commits according to a strict set of guidelines. However, there are some limitations here:

Ordinarily, I would suggest simply having a committer fix up the branch before merging, but this has its own caveats:

Though I don't see committers consistently paying attention to this guideline anyway, it feels more like a suggestion. The policy may be worth reconsidering.

Overall, this whole process does in fact drive away contributors; many contributors either open a new PR if they mess things up (which IMO is even more disruptive as you lose the continuity of discussion), or they give up entirely. I even saw one contributor open 3 separate PRs in a row, have rebase issues on all of them, then disappear afterwards.

Besides, nitting about something that can't be easily explained in a GH comment doesn't feel good, and takes more time and effort (and stress for the new contributor) than fixing it ourselves. But I feel we didn't set the contributors up to succeed in the first place if we just link to another massive document for them to read through (some of which even conflicts with our guidelines).

PS. I never understood the reason for enforcing a commit format, what was the reason for this? Are we using some automation that depends on it? Same goes for merge commits, what is the negative impact of having those in the PR? When we merge the PR we generate such merge commits in the history anyway.

Proposal

PR-ing against the correct branch must continue to be enforced, for CI and hydra-related reasons, but we should either:

Checklist

A previous issue #300113 + associated PR exists on this topic, but they're marked completed, and I don't find a more overarching issue about this.


Add a :+1: reaction to issues you find important.

AndersonTorres commented 1 month ago

It looks like a problem that arises because the GitHub webapp is a clearly subpar experience.

And this is not because the commandline interface is somewhat superior. I use Magit from Emacs most of the time.

eclairevoyant commented 1 month ago

Yeah, it doesn't help that GH tries to impose the merge workflow rather than rebase.