From 1b82ac1de87b31266967d97a5d4bcaad59dbfc1c Mon Sep 17 00:00:00 2001 From: root Date: Fri, 17 Apr 2026 20:13:17 +0000 Subject: [PATCH] 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) --- git-hangman-lab/scripts/repo | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/git-hangman-lab/scripts/repo b/git-hangman-lab/scripts/repo index 73f6932..9fbd63b 100755 --- a/git-hangman-lab/scripts/repo +++ b/git-hangman-lab/scripts/repo @@ -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..."