Each Minecraft version has its own copy of the version-specific code (versions/<mc>/src). A fix made in one version has to be repeated by hand in up to seven others, even though most files are identical or nearly identical between versions (21 of 52 files are byte-identical across all 8). Forgetting a version, or mis-copying a change, is easy.
Proposal
A script, scripts/port.sh, that takes a change made in one version and applies it to the others with git apply --3way:
Source: by default, the uncommitted changes under versions/<from>/src. Optionally, a commit.
Target: every other version, or a chosen list.
Clean application where the files match. Where a version really differs, normal merge conflicts appear in that file only.
Report: per version, one of "applied", "conflicts in …", "already applied" or "failed". Non-zero exit if any version needs attention.
Scope: only src/ is ported. build.gradle and gradle.properties are version-specific on purpose.
Related: #8 (closed in favour of keeping separate version modules, with this tooling).
## Problem
Each Minecraft version has its own copy of the version-specific code (`versions/<mc>/src`). A fix made in one version has to be repeated by hand in up to seven others, even though most files are identical or nearly identical between versions (21 of 52 files are byte-identical across all 8). Forgetting a version, or mis-copying a change, is easy.
## Proposal
A script, `scripts/port.sh`, that takes a change made in one version and applies it to the others with `git apply --3way`:
- **Source:** by default, the uncommitted changes under `versions/<from>/src`. Optionally, a commit.
- **Target:** every other version, or a chosen list.
- **Clean application** where the files match. Where a version really differs, **normal merge conflicts appear in that file only**.
- **Report:** per version, one of "applied", "conflicts in …", "already applied" or "failed". Non-zero exit if any version needs attention.
- **Scope:** only `src/` is ported. `build.gradle` and `gradle.properties` are version-specific on purpose.
Related: #8 (closed in favour of keeping separate version modules, with this tooling).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
Each Minecraft version has its own copy of the version-specific code (
versions/<mc>/src). A fix made in one version has to be repeated by hand in up to seven others, even though most files are identical or nearly identical between versions (21 of 52 files are byte-identical across all 8). Forgetting a version, or mis-copying a change, is easy.Proposal
A script,
scripts/port.sh, that takes a change made in one version and applies it to the others withgit apply --3way:versions/<from>/src. Optionally, a commit.src/is ported.build.gradleandgradle.propertiesare version-specific on purpose.Related: #8 (closed in favour of keeping separate version modules, with this tooling).