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:
@@ -341,6 +341,11 @@ do_get_latest() {
|
|||||||
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
|
||||||
|
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
|
if [[ "$RECURSIVE" == "true" ]]; then
|
||||||
echo "Updating submodules..."
|
echo "Updating submodules..."
|
||||||
|
|||||||
Reference in New Issue
Block a user