Skip to content

fix(git): support relative worktree repositories - #559

Closed
chirino wants to merge 2 commits into
gitx:masterfrom
chirino:fix/support-relative-worktree-repositories
Closed

chirino wants to merge 2 commits into
gitx:masterfrom
chirino:fix/support-relative-worktree-repositories

Conversation

@chirino

@chirino chirino commented Jul 17, 2026

Copy link
Copy Markdown

Summary

Update GitX to use ObjectiveGit with libgit2 1.9.4 so repositories using the relativeWorktrees extension can be opened. This depends on gitx/objective-git#98.

Changes

  • Update GitX buffer API usage and advance the ObjectiveGit submodule
  • Add default make, clean, and rebuild targets for local builds

chirino added 2 commits July 17, 2026 10:03
Signed-off-by: Hiram Chirino <[email protected]>
Update ObjectiveGit and GitX for libgit2 1.9.4 so repositories using the relativeWorktrees extension can be opened.

Signed-off-by: Hiram Chirino <[email protected]>
@goneng

goneng commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

This has since landed by another route, so I think it can be closed.

The diagnosis here was right: relative-worktree repos need a libgit2 that
recognises the extension. relativeworktrees entered libgit2's
builtin_extensions in 0516d66f, first released in 1.9.4, and master picked
that up in #641 (through gitx/objective-git#101, since #98 was closed). I
built a probe against the currently pinned libgit2 and pointed it at a repo
with extensions.relativeWorktrees=true: both the main checkout and the
worktree open with rc=0 and resolve workdir and commondir correctly.

The rest of the diff is covered too. The .asize -> .size fix landed in #582,
GitRepoFinder.m is not in the Xcode target, and the Makefile has since grown
targets for every CI step.

One line does survive: git_buf_free -> git_buf_dispose in
PBRepositoryFinder.m:52. That is part of the wider deprecated-shim cleanup
rather than anything worth keeping this PR open for.

Thanks for chasing this down.

@hannesa2

hannesa2 commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

One line does survive: git_buf_free -> git_buf_dispose in
PBRepositoryFinder.m:52. That is part of the wider deprecated-shim cleanup
rather than anything worth keeping this PR open for.

I used it here #761
After that merge, we can close this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants