Pārlūkot izejas kodu

Fix track remote branch

bryan 2 gadi atpakaļ
vecāks
revīzija
97f6e0a927
1 mainītis faili ar 12 papildinājumiem un 2 dzēšanām
  1. 12 2
      openwrtbuilder

+ 12 - 2
openwrtbuilder

@@ -632,10 +632,20 @@ fromSource() {
  
     if [[ $RELEASE == "snapshot" ]]; then
         gitworktreedir="$SRCDIR/$profile/$RELEASE"
-        git -C "$GITSRCDIR" worktree add -fd "$gitworktreedir" master
+        git -C "$GITSRCDIR" \
+            worktree add \
+            --force \
+            --detach \
+            "$gitworktreedir" \
+            "master"
     else
         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
 
     seed_file="$gitworktreedir/.config"