Fork SHA with Pre-Applied Reverts
Why first
- Semantic cleanness. Gerrit consumes JGit as code, full stop. The divergence isn't a Gerrit concern; it's a fork-of-JGit concern. The boundary between projects is honest.
- Smallest Gerrit-tree footprint. One WORKSPACE SHA. No
tools/jgit/directory, nopatches=declaration, nopatch_tool, no patch-file maintenance. Looking at Gerrit's tree, you can't tell JGit is patched at all — and arguably you shouldn't be able to. - Established precedent. The
rules_nodejsapproach on stable-3.14 already does exactly this pattern and is accepted. Consistency with an existing precedent is itself a maintainer value. - Maintenance shape is identical to Option 1. Three reverts to rebase per JGit SHA bump. Same work, different location — and the location matters.
Concerns to address before landing
- Fork ownership. Currently a personal fork. For long-term sustainability the fork should sit under a Gerrit-team org, not an individual's GitHub account. If the maintainer leaves, the fork shouldn't disappear with them.
- Discoverability. A developer reading WORKSPACE sees a SHA pointing at
eclipse-jgit/jgitvia fork-network reachability, with no obvious signal that "this is patched." A short comment in WORKSPACE pointing at the fork branch mitigates this. - End-of-life cleanup. When stable-3.13 ages out, who removes the fork? Needs to be on the same checklist as removing
tools/jgit/.