Configure Git diff for WorldEdit core logic changes
version/7.4.xWhen comparing changes between worldedit-core-mc and platform-specific implementations like worldedit-fabric or worldedit-neoforge, you can use a custom text converter to reduce noise. This setup replaces platform-specific names with platform$ in diffs, allowing you to focus on core logic changes rather than renames.
Follow these steps to configure your local Git environment:
- Add the following lines to your
.git/info/attributesfile:
worldedit-core-mc/src/main/java/com/sk89q/worldedit/coremc/**/*.java diff=core-mc
worldedit-fabric/src/main/java/com/sk89q/worldedit/fabric/**/*.java diff=core-mc
worldedit-neoforge/src/main/java/com/sk89q/worldedit/neoforge/**/*.java diff=core-mc- Configure the
core-mcdiff tool using the provided Python script:
git config diff.core-mc.textconv ./worldedit-core-mc/textconv-core-mc.py- Enable rename detection in Git:
git config diff.renames copyNote: Remember to remove the changes made to .git/info/attributes once you have finished your comparison to prevent affecting future diffs.
git config diff.core-mc.textconv ./worldedit-core-mc/textconv-core-mc.py
git config diff.renames copy