fix: run repo config before fetch in get-latest update path

Ensures credentials are configured when updating an existing repo,
not just when cloning a new one.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
zhi
2026-04-17 20:15:55 +00:00
parent 1b82ac1de8
commit fd0f84d6b8

View File

@@ -338,6 +338,8 @@ do_get_latest() {
git -C "$REPO_DIR" checkout -- . 2>/dev/null || true git -C "$REPO_DIR" checkout -- . 2>/dev/null || true
fi fi
do_config --repo-path "$REPO_DIR"
echo "Fetching: $REPO_NAME ($BRANCH)" echo "Fetching: $REPO_NAME ($BRANCH)"
git -C "$REPO_DIR" fetch origin "$BRANCH" 2>/dev/null || true git -C "$REPO_DIR" fetch origin "$BRANCH" 2>/dev/null || true
git -C "$REPO_DIR" checkout "$BRANCH" 2>/dev/null || git -C "$REPO_DIR" checkout -b "$BRANCH" "origin/$BRANCH" 2>/dev/null || true git -C "$REPO_DIR" checkout "$BRANCH" 2>/dev/null || git -C "$REPO_DIR" checkout -b "$BRANCH" "origin/$BRANCH" 2>/dev/null || true