aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorMinecrell <[email protected]>2020-05-06 11:31:08 +0200
committerGitHub <[email protected]>2020-05-06 05:31:08 -0400
commit5c0bfffa09e97ff5717c5f06523b4bc90e0f3c39 (patch)
treeb8ca0448fb754b2dde1b8a6ce8e6dae7e62e8b5e /scripts
parentf37381ea8aa3ad48c9d0540286347d8603f08359 (diff)
downloadPaper-5c0bfffa09e97ff5717c5f06523b4bc90e0f3c39.tar.gz
Paper-5c0bfffa09e97ff5717c5f06523b4bc90e0f3c39.zip
Speed up rebuilding patches and reduce diff
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/rebuildPatches.sh10
1 files changed, 2 insertions, 8 deletions
diff --git a/scripts/rebuildPatches.sh b/scripts/rebuildPatches.sh
index b89ee69f50..7dd38d46fd 100755
--- a/scripts/rebuildPatches.sh
+++ b/scripts/rebuildPatches.sh
@@ -16,13 +16,7 @@ function cleanupPatches {
cd "$1"
for patch in *.patch; do
echo "$patch"
- gitver=$(tail -n 2 "$patch" | grep -ve "^$" | tail -n 1)
- diffs=$($gitcmd diff --staged "$patch" | grep --color=none -E "^(\+|\-)" | grep --color=none -Ev "(From [a-f0-9]{32,}|\-\-\- a|\+\+\+ b|^.index)")
-
- 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
+ diffs=$($gitcmd diff --staged "$patch" | grep --color=none -E "^(\+|\-)" | grep --color=none -Ev "(\-\-\- a|\+\+\+ b|^.index)")
if [ "x$diffs" == "x" ] ; then
$gitcmd reset HEAD "$patch" >/dev/null
@@ -56,7 +50,7 @@ function savePatches {
cd "$basedir/$target"
- $gitcmd format-patch --no-stat -N -o "$basedir/${what_name}-Patches/" upstream/upstream >/dev/null
+ $gitcmd format-patch --zero-commit --full-index --no-signature --no-stat -N -o "$basedir/${what_name}-Patches/" upstream/upstream >/dev/null
cd "$basedir"
$gitcmd add -A "$basedir/${what_name}-Patches"
if [ "$nofilter" == "0" ]; then