Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 02:50:09 +01:00
Update rebuildPatches to ignore git version string.
Dieser Commit ist enthalten in:
Ursprung
17af62c898
Commit
41b7c5f465
@ -5,8 +5,16 @@ echo "Rebuilding patch files from current fork state..."
|
||||
function cleanupPatches {
|
||||
cd $1
|
||||
for patch in *.patch; do
|
||||
lines=$(git diff --staged $patch | grep -E "^(\+|\-)" | grep -Ev "(From [a-z0-9]{32,}|\-\-\- a|\+\+\+ b|.index)" | wc -l)
|
||||
if [ "$lines" == "0" ] ; then
|
||||
gitver=$(tail -n 2 $patch | grep -ve "^$" | tail -n 1)
|
||||
diffs=$(git diff --staged $patch | grep -E "^(\+|\-)" | grep -Ev "(From [a-z0-9]{32,}|\-\-\- a|\+\+\+ b|.index)")
|
||||
|
||||
testver=$(echo "$diffs" | tail -n 2 | grep -ve "^$" | tail -n 1 | grep "$gitver")
|
||||
if [ "x$testver" != "x" ]; then
|
||||
diffs=$(echo "$diffs" | head -n -2)
|
||||
fi
|
||||
|
||||
|
||||
if [ "x$diffs" == "x" ] ; then
|
||||
git reset HEAD $patch >/dev/null
|
||||
git checkout -- $patch >/dev/null
|
||||
fi
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren