diff options
| author | Ben Sima <ben@bsima.me> | 2025-11-20 21:28:54 -0500 |
|---|---|---|
| committer | Ben Sima <ben@bsima.me> | 2025-11-20 21:28:54 -0500 |
| commit | f2baa51303f0d7d302e397357b02da0188b30fd7 (patch) | |
| tree | e0ccbc01938d31c45290f2665474b5a58542635c /Omni/Agent | |
| parent | b444cac08339c674758120fa870b03fdad679fde (diff) | |
fix(worker): force checkout to overwrite untracked files
Diffstat (limited to 'Omni/Agent')
| -rwxr-xr-x | Omni/Agent/start-worker.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Omni/Agent/start-worker.sh b/Omni/Agent/start-worker.sh index 1aaba7f..820c1bb 100755 --- a/Omni/Agent/start-worker.sh +++ b/Omni/Agent/start-worker.sh @@ -87,7 +87,9 @@ while true; do BRANCH_NAME="task/$TASK_ID" if git show-ref --verify --quiet "refs/heads/$BRANCH_NAME"; then echo "Resuming existing branch $BRANCH_NAME" - git checkout "$BRANCH_NAME" >/dev/null + # Force checkout to overwrite untracked files (like .tasks/counters.jsonl) + # that may have been generated by sync tools but are tracked in the branch. + git checkout -f "$BRANCH_NAME" >/dev/null else echo "Creating new branch $BRANCH_NAME" git checkout -b "$BRANCH_NAME" >/dev/null |
