fix: add merge step after fetch in repo get-latest

get-latest was fetching but not merging, so local branch stayed behind
origin. Now uses ff-only merge by default, or reset --hard with --force.

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

View File

@@ -341,6 +341,11 @@ do_get_latest() {
echo "Fetching: $REPO_NAME ($BRANCH)"
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
if [[ "$FORCE" == "true" ]]; then
git -C "$REPO_DIR" reset --hard "origin/$BRANCH" 2>/dev/null || true
else
git -C "$REPO_DIR" merge --ff-only "origin/$BRANCH" 2>/dev/null || true
fi
if [[ "$RECURSIVE" == "true" ]]; then
echo "Updating submodules..."