ensure upstream is set correctly on apply patches
This commit is contained in:
parent
2f0866fef0
commit
217f2135b0
|
@ -9,6 +9,7 @@ function applyPatch {
|
||||||
what_name=$(basename $what)
|
what_name=$(basename $what)
|
||||||
target=$2
|
target=$2
|
||||||
branch=$3
|
branch=$3
|
||||||
|
|
||||||
cd "$basedir/$what"
|
cd "$basedir/$what"
|
||||||
git fetch
|
git fetch
|
||||||
git branch -f upstream "$branch" >/dev/null
|
git branch -f upstream "$branch" >/dev/null
|
||||||
|
@ -19,8 +20,9 @@ function applyPatch {
|
||||||
fi
|
fi
|
||||||
cd "$basedir/$target"
|
cd "$basedir/$target"
|
||||||
echo "Resetting $target to $what_name..."
|
echo "Resetting $target to $what_name..."
|
||||||
git remote add -f upstream ../$what >/dev/null 2>&1
|
git remote rm upstream > /dev/null 2>&1
|
||||||
git checkout master >/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 fetch upstream >/dev/null 2>&1
|
||||||
git reset --hard upstream/upstream
|
git reset --hard upstream/upstream
|
||||||
echo " Applying patches to $target..."
|
echo " Applying patches to $target..."
|
||||||
|
|
Loading…
Reference in New Issue