3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 04:20:04 +01:00

ensure upstream is set correctly on apply patches

Dieser Commit ist enthalten in:
Aikar 2016-03-25 00:11:38 -04:00
Ursprung 2f0866fef0
Commit 217f2135b0

Datei anzeigen

@ -9,6 +9,7 @@ function applyPatch {
what_name=$(basename $what)
target=$2
branch=$3
cd "$basedir/$what"
git fetch
git branch -f upstream "$branch" >/dev/null
@ -19,8 +20,9 @@ function applyPatch {
fi
cd "$basedir/$target"
echo "Resetting $target to $what_name..."
git remote add -f upstream ../$what >/dev/null 2>&1
git checkout master >/dev/null 2>&1
git remote rm upstream > /dev/null 2>&1
git remote add upstream $basedir/$what >/dev/null 2>&1
git checkout master 2>/dev/null || git checkout -b master
git fetch upstream >/dev/null 2>&1
git reset --hard upstream/upstream
echo " Applying patches to $target..."