Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 11:00:06 +01:00
Fix rebuildPatches and grep colors not reverting junk changes
we've seen some index lines change in length in some PR's, though this script was suppose to ignore those changes already. The only way I can see that not working is if the color mode of grep is breaking the pattern matching, as some people default their grep to use color=always this adds color=none to ensure colors are disabled, should ensure it.
Dieser Commit ist enthalten in:
Ursprung
f21e10da65
Commit
e020015aad
@ -14,9 +14,9 @@ function cleanupPatches {
|
||||
for patch in *.patch; do
|
||||
echo "$patch"
|
||||
gitver=$(tail -n 2 "$patch" | grep -ve "^$" | tail -n 1)
|
||||
diffs=$($gitcmd diff --staged "$patch" | grep -E "^(\+|\-)" | grep -Ev "(From [a-z0-9]{32,}|\-\-\- a|\+\+\+ b|.index)")
|
||||
diffs=$($gitcmd diff --staged "$patch" | grep --color=none -E "^(\+|\-)" | grep --color=none -Ev "(From [a-z0-9]{32,}|\-\-\- a|\+\+\+ b|^.index)")
|
||||
|
||||
testver=$(echo "$diffs" | tail -n 2 | grep -ve "^$" | tail -n 1 | grep "$gitver")
|
||||
testver=$(echo "$diffs" | tail -n 2 | grep --color=none -ve "^$" | tail -n 1 | grep --color=none "$gitver")
|
||||
if [ "x$testver" != "x" ]; then
|
||||
diffs=$(echo "$diffs" | sed 'N;$!P;$!D;$d')
|
||||
fi
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren