MinecraftForge / ForgeFlower

Forge's modifications to FernFlower. Fixing various bugs/inconsistencies. Main Repo: https://github.com/MinecraftForge/FernFlower
Apache License 2.0
80 stars 44 forks source link

Fix jgit branch calculation #92

Closed zml2008 closed 3 years ago

zml2008 commented 3 years ago

seems there's a behaviour difference between grgit and jgit -- when grgit is on a detached head it returns null for a branch, while jgit will return the commit id

This resulted in published builds with versions like: https://files.minecraftforge.net/maven/net/minecraftforge/forgeflower/1.5.498.1-ab3565d50e8e8e293a0977878f0b825b828583ae/forgeflower-1.5.498.1-ab3565d50e8e8e293a0977878f0b825b828583ae.jar

Tested on detached head, master branch, and a non-master branch, and seems to produce the correct results.