Repository navigation
Land on any git remote, with GitHub and GitLab as forges - #14
Conversation
…d, renames, folder 3-way merge, home copy fixes - gft up remounts copies after a restart; commands remount the copy they work on - ls checks copies in parallel, drops same-bytes overlaps, flags unmounted copies; --json on ls, status, changes - gft diff [A [B]]; changes/diff between copies on different commits - sync merges into upstream's new name for renamed files, sets aside local git commits, works in the home copy - plain folders merge three ways on sync; land's refusal points at sync - the home copy shows its own changes in status; new --from HOME copies them - land puts text files inline in the tree, in batches, instead of a blob call each - a second get of a same-named repository uses OWNER-NAME workspaces; get names where an existing project is - rm --delete-branch; drop takes the home folder name - README: the pitch, when plain git is better, history on demand with git fetch --deepen Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01CboUL9BU7nvDEZKfQBSkkq
…cutable bit, merge only regular files in folders Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01CboUL9BU7nvDEZKfQBSkkq
… conflicts with renames, never merge through a renamed link Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01CboUL9BU7nvDEZKfQBSkkq
…quests, mount the home copy for new --from HOME Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01CboUL9BU7nvDEZKfQBSkkq
`gft land` no longer needs GitHub's API to commit: it builds one commit from the copy's files with git's plumbing (a separate index, so the copy's own is untouched) and pushes it to graft/NAME with a lease, so any remote git can push to works, with the credentials git already has. Review requests come from a small forge layer: pull requests on GitHub and GitHub Enterprise, merge requests on GitLab and self-managed GitLab. github.com and gitlab.com are known by host; `gft get URL --forge github|gitlab[:PROJECT]` names one for a server of your own, and `--forge none` lands branches alone. Without a forge, sync counts a branch as merged once the default branch has every file as the landing left it. Tokens come from GITHUB_TOKEN/GH_TOKEN or GITLAB_TOKEN, else from gh or glab if installed, and are offered to git push too. Projects saved before this are read as GitHub repositories. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01CboUL9BU7nvDEZKfQBSkkq
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01CboUL9BU7nvDEZKfQBSkkq
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b9cf21d87c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…uote, skip GitLab forks - new --on keeps the landing's fingerprints: with no forge they are how sync tells the landing underneath was merged. - Paths starting with a double quote (or holding a line break) go to hash-object --stdin-paths C-quoted, so git hashes the file named. - GitLab merge requests from forks with a branch of the same name are not the copy's. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01CboUL9BU7nvDEZKfQBSkkq
|
@codex review Generated by Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 732dad3f33
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…for the forge's API Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01CboUL9BU7nvDEZKfQBSkkq
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f01c3822cd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…b Enterprise projects to their server Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01CboUL9BU7nvDEZKfQBSkkq
What changes
gft landno longer needs GitHub's API, a GitHub token, orghto commit. It builds one commit from the copy's files with git's plumbing, using a separate index so the copy's own index andHEADstay untouched. It then pushes that commit tograft/NAMEwith--force-with-lease. Any remote that git can push to works, with the credentials git already has.Review requests now come from a small forge layer (
src/forge.rs). It replacessrc/github.rs.Draft:title prefix. Merge detection usesmerge_commit_sha, thensquash_commit_sha, thensha.gft get URL --forge github|gitlab[:PROJECT]names the forge.--forge nonelands branches only.landprints the branch and any links the server sends back.synctreats a landing as merged once every file the landing touched is the same on the default branch.rm --delete-branchdeletes the branch through git, with a lease.GITHUB_TOKEN/GH_TOKENorGITLAB_TOKEN. Otherwise Graft asksgh auth tokenorglab config get tokenif they are installed.git pushthrough a one-off credential helper that reads it from the environment.landstops before pushing when a forge has no token.src/remote.rshandles remote branches (ls-remote), pushing and deleting with leases, and building the commit. Parents missing from the shallow, partial.gitare fetched with--depth=1 --filter=blob:none. Presence is checked withrev-list --missing=print, becausecat-filetriggered a 50 s lazy fetch.Projects saved before this change are read as GitHub repositories (
remoteandforgeare filled in on load).Benchmark (GitHub, from a cloud machine, 6 files changed)
graft/*branchesgit pushgft landI couldn't time the old API landing here: this environment's proxy refuses GitHub API writes. That path made 4 sequential write calls (ref, tree, commit, ref update), plus one per non-text file. Read calls here took 0.14–0.34 s each, so the two paths are in the same range. The push now does in one step what used to take one API call per file.
Tests
tests/workflow.rs: now pushes to a localfile://upstream. The fake GitHub serves only pulls and compare.updatehook.--forge noneproject (landing, "nothing new to land", detecting a squash merge by content,rm --delete-branchwith and without a moved branch). It also covers agitlab:o/nproject (draft merge request, description update, merged and landing again as a new merge request on top of the merge).remote:lines.GRAFT_REQUIRE_MOUNT=1). fmt and clippy (-D warnings) are clean.Docs
The README now covers any git remote,
--forge, tokens, and a new "Remotes and forges" section. The worktree comparison has the measured landing time.Generated by Claude Code