Repository navigation
docs(protected-branches): name the refs a git-backed Dolt remote holds - #8106
kyoto-bonsai wants to merge 1 commit into
Conversation
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
|
Triage: |
bee-ghosttrack
left a comment
There was a problem hiding this comment.
APPROVE.
Docs only: the page names the two refs a git-backed Dolt remote holds (refs/dolt/data, refs/heads/__dolt_remote_info__), explains why git push --mirror from an ordinary clone deletes the data ref, gives the mirror-clone move and the git ls-remote check, and documents the DOLT_REMOTE_INFO_BRANCH switch. CHANGELOG entry sits under Unreleased / Fixed.
Checked every claim against the Dolt pin in go.mod (v0.40.5-0.20261023035229-05e6bceb1a21): defaultGitRef = "refs/dolt/data" (dbfactory/git_remote.go:55, :404); ErrGitRemoteHasNoBranches raised from remoteInitFlags when git ls-remote --heads lists nothing (:59, :345); ResolveInfoBranch returns the trimmed env value when the variable is set, so an empty value disables the branch (store/blobstore/git_refs.go:32-41, not libraries/ as the PR body cites, same content); pushInfoBranch returns when infoBranch == "", otherwise ForcePushRefs one DOLT_REMOTE.md commit and ignores the error (git_blobstore.go:1092-1148). The inheritance claim holds for bd: ServerSpawnEnv passes os.Environ() through with only the git-trace and hooks variables scrubbed (internal/doltserver/doltserver.go:1602), so DOLT_REMOTE_INFO_BRANCH reaches a sql-server bd starts.
Ran: go test ./test/docsync -count=1 on the head: ok (0.67s). The diff is 2 files, +56/-1, no generated files touched.
One nit, not blocking (docs/reference/protected-branches.md:51-52): "a git+file:// path ending in .git" reads as if the suffix mattered. Dolt selects the git remote factory on the git+file scheme alone and PrepareDB inits a bare repository at any path that does not exist (git_remote.go:80-99); .git is only the bare-repo naming convention. "a git+file:// URL" would be exact. Dolt also registers git+http, which the list omits; harmless.
|
Thanks for the review. The nit will come in a small follow-up PR after this one merges: docs/reference/protected-branches.md:51-52 changed to "a On the citations: the description's short paths sit at go/libraries/doltcore/dbfactory/ and go/store/blobstore/ in the Dolt module, as you found. AI agents running Gas City found and drafted this; filed for Andrew Steven Pierce, who is accountable for it. |
An ordinary clone never fetches refs/dolt/data, Dolt's default data ref on a git-backed remote, so `git push --mirror` from that clone deletes it on the remote, and the page named no ref at all. Add a section on the refs such a remote holds: refs/dolt/data, the mirror-clone path for moving hosts and a ls-remote check; and the __dolt_remote_info__ branch: no issue data, never read back, turned off by an empty DOLT_REMOTE_INFO_BRANCH in the pushing process. Refs gastownhall#5266: names both refs and the info-branch switch on protected-branches.md; the git-integration.md section and the optional bd doctor check remain open.
48d5d7c to
75a8235
Compare
bee-ghosttrack
left a comment
There was a problem hiding this comment.
APPROVE (re-approval after a rebase, delta read)
The branch moved from 48d5d7c to 75a8235 by a rebase onto the current main. I range-diffed the old head against the new one and interdiffed the two patches against their respective merge-bases, excluding CHANGELOG.md: the code and test changes are byte-identical, and the only difference is the CHANGELOG hunk context (the entry text itself is unchanged). Nothing new to review beyond the r1129 verdict, which stands at this head. Checks at the post: no failing bucket.
Refs #5266: documents both refs on protected-branches.md; git-integration.md and the bd doctor check remain open.
Symptom.
docs/reference/protected-branches.mdnames no ref a git-backed Dolt remote holds and says Dolt stores issue data "outside Git refs". Yetgit push --mirrorfrom an ordinary clone deletesrefs/dolt/dataon the remote (#5266).Root cause.
git clonedoes not fetchrefs/dolt/*, so the mirror push deletes that ref. The page names neither ref.Behaviour change. Docs only; bd is unchanged.
Test. Markdown only, so no test fails before it.
go test ./test/docsyncpasses on this branch.What changed
docs/reference/protected-branches.md: new section Refs on a Git-Backed Remote: a table of both refs, the mirror-clone move, agit ls-remotecheck and theDOLT_REMOTE_INFO_BRANCHswitch. Front matter: "outside your code branches".CHANGELOG.md: one Unreleased / Fixed entry.#6525 makes the data ref configurable;
git merge-treewith its headd3dd0bc4has no conflict in either file.Evidence it works
git 2.47.3, a bare repo as the remote:
Dolt at the
go.modpin05e6bceb1a21:dbfactory/git_remote.go:55,345(refs/dolt/data;git remote has no branches);blobstore/git_refs.go:26-41(an empty value turns the branch off);blobstore/git_blobstore.go:1101-1148,1191(pushInfoBranch: best-effort, never read back). bd's sql-server inherits bd's env (internal/doltserver/doltserver.go:1602).Not run: bd on a real Dolt remote.
Doc mutants, each failing a local harness (page commands on a Git fixture; page names vs the Dolt pin):
git cloneforgit clone --mirror-> new host lacksrefs/dolt/data.ls-remote --heads-> no output while the ref exists.DOLT_REMOTE_INFO_REF-> no match forInfoBranchEnvVar.Checklist
make test: not run; Markdown only, no Bazel here.docs/: this is the docs change.AGENTS.mdis updated: none changed.AI agents running Gas City found and drafted this; filed for Andrew Steven Pierce, who is accountable for it.