Improve upstream merge script to rebuild patches
this will help ensure that upstreams apply as cleanly as it does manually the filtering makes the patches more fragile, but usually not an issue for small updates. this will unfilter, apply the cleanest patches, then the next rebuild will filter out unnecessary changes
This commit is contained in:
parent
747e70a90d
commit
96f8b1af6c
2 changed files with 22 additions and 2 deletions
|
@ -8,7 +8,10 @@ source "$basedir/scripts/functions.sh"
|
|||
gitcmd="git -c commit.gpgsign=false -c core.safecrlf=false"
|
||||
|
||||
echo "Rebuilding patch files from current fork state..."
|
||||
|
||||
nofilter="0"
|
||||
if [ "$2" = "nofilter" ]; then
|
||||
nofilter="1"
|
||||
fi
|
||||
function cleanupPatches {
|
||||
cd "$1"
|
||||
for patch in *.patch; do
|
||||
|
@ -56,7 +59,9 @@ function savePatches {
|
|||
$gitcmd format-patch --no-stat -N -o "$basedir/${what_name}-Patches/" upstream/upstream >/dev/null
|
||||
cd "$basedir"
|
||||
$gitcmd add -A "$basedir/${what_name}-Patches"
|
||||
cleanupPatches "$basedir/${what_name}-Patches"
|
||||
if [ "$nofilter" == "0" ]; then
|
||||
cleanupPatches "$basedir/${what_name}-Patches"
|
||||
fi
|
||||
echo " Patches saved for $what to $what_name-Patches/"
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue