Skip pushing merges when the repo has no remote

This commit is contained in:
Ian Gulliver
2026-10-22 18:05:52 -07:00
parent f3b15696b3
commit da7f324bab
6 changed files with 69 additions and 15 deletions
+1
View File
@@ -96,6 +96,7 @@ Coordination of merges, discards, reviews, ready-for-merge prompts, workflow sta
## git
- A project's remote is `origin`, checked each time byre would fetch or push. A repo with no `origin` still works: merges land on the local default branch and byre skips the fetch, the push and the notes refspec, so a fresh `git init` is enough to start. Adding `origin` later takes effect on the next merge; the notes refspec is added at the next server start.
- Merge notes live under `refs/notes/byre`. byre adds the fetch refspec `refs/notes/byre*:refs/notes/byre*` to each checkout; it's a pattern because git refuses a fetch whose exact refspec names a ref the remote doesn't have yet, as it doesn't before the first note is pushed. Another clone adds it with `git config --add remote.origin.fetch 'refs/notes/byre*:refs/notes/byre*'`; `git log --notes=byre` shows the notes.
- `git fetch` and `git push` run non-interactively (`GIT_TERMINAL_PROMPT=0`, ssh `BatchMode=yes`, overriding any `core.sshCommand`), so a remote needing a password or an unknown host key fails at once instead of waiting for input. Every git command runs in its own process group, killed whole on timeout, so an `ssh` it started can't finish a fetch or push after byre has moved on.
- A push error other than a non-fast-forward rejection is ambiguous, since the remote may have taken the push before the connection dropped; byre then fetches and checks whether the commit landed before deciding.