Fix track remote branch

This commit is contained in:
2023-01-31 15:33:21 -05:00
parent 03db94e20d
commit 97f6e0a927

View File

@@ -632,10 +632,20 @@ fromSource() {
if [[ $RELEASE == "snapshot" ]]; then if [[ $RELEASE == "snapshot" ]]; then
gitworktreedir="$SRCDIR/$profile/$RELEASE" gitworktreedir="$SRCDIR/$profile/$RELEASE"
git -C "$GITSRCDIR" worktree add -fd "$gitworktreedir" master git -C "$GITSRCDIR" \
worktree add \
--force \
--detach \
"$gitworktreedir" \
"master"
else else
gitworktreedir="$SRCDIR/$profile/$RELEASE" gitworktreedir="$SRCDIR/$profile/$RELEASE"
git -C "$GITSRCDIR" worktree add -fd "$gitworktreedir" "openwrt-${RELEASE%.*}" git -C "$GITSRCDIR" \
worktree add \
--force \
--detach \
"$gitworktreedir" \
"origin/openwrt-${RELEASE%.*}"
fi fi
seed_file="$gitworktreedir/.config" seed_file="$gitworktreedir/.config"