RESOLVED FIXED306957
git-webkit update fails when run from a git worktree
https://bugs.webkit.org/show_bug.cgi?id=306957
Summary git-webkit update fails when run from a git worktree
David Kilzer (:ddkilzer)
Reported 2026-02-04 09:41:33 PST
When running `git-webkit update` (or `git-webkit pfr`) from a git worktree, the command fails with the error: ``` fatal: refusing to fetch into branch 'refs/heads/main' checked out at '<main-repository-path>' ``` The issue occurs because the `pull()` method in `local/git.py` runs `git fetch origin main:main` to update the local branch reference before rebasing. Git refuses to update a branch that is checked out in any worktree (including the main repository checkout) as a safety mechanism to prevent data corruption.
Attachments
Radar WebKit Bug Importer
Comment 1 2026-02-04 09:52:47 PST
David Kilzer (:ddkilzer)
Comment 2 2026-02-04 09:56:41 PST
Sam Sneddon [:gsnedders]
Comment 3 2026-02-04 13:36:44 PST
(In reply to David Kilzer (:ddkilzer) from comment #0) > `git-webkit pfr` Bug 254020 is an earlier report of that not working with `main` checked out elsewhere, fwiw, which can probably be forward-duped to this given this has a PR.
EWS
Comment 4 2026-02-18 09:52:14 PST
Committed 307764@main (6adb0db78d8f): <https://commits.webkit.org/307764@main> Reviewed commits have been landed. Closing PR #57868 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.