Commit 4c91e36
committed
fix(deploy): prevent git fetch failure for checked-out branches
The worktree update path ran `git fetch origin "$BRANCH"` which,
due to the bare repo's refspec (+refs/heads/*:refs/heads/*), tried
to update the local branch ref. Git refuses this when the branch is
checked out in a worktree, breaking main deployments on every push.
Add --refmap="" to suppress the configured refspec so only FETCH_HEAD
is updated. The subsequent `git reset --hard FETCH_HEAD` works as
originally intended.1 parent e9dd6b4 commit 4c91e36
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
117 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
118 | 121 | | |
119 | 122 | | |
120 | 123 | | |
| |||
0 commit comments