Repository navigation
fix deprecated libgit2 API usage in gitdir discovery - #761
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The GitRepoFinder conversion drops the required NUL terminator before passing bytes to stringWithUTF8String:.
Review effort: Balanced
Findings: 1
What changed in this PR
Modernizes git-directory discovery for current libgit2 buffer APIs.
Changes:
- Replaces deprecated
git_buf_freewithgit_buf_dispose. - Replaces removed
asizeusage withsize.
| File | Description |
|---|---|
Classes/git/PBRepositoryFinder.m |
Updates buffer disposal. |
Classes/git/GitRepoFinder.m |
Updates buffer size and disposal APIs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
@hannesa2 , The PBRepositoryFinder.m change looks good.
For GitRepoFinder.m, consider deleting it instead:
it has been orphaned since commit 8e2e25b (from 2014) renamed the class to PBRepositoryFinder.
It is not in the Xcode project, has no header, and nothing references it.
The old asize field doesn't exist in libgit2 1.9, so it never compiled, and
Copilot's finding and the autofix commit only touch code that never runs.
Removing the file would leave a single commit like
"Replace deprecated git_buf_free and drop orphaned GitRepoFinder.m".
44407c4 to
f08332b
Compare
|
I was just wondering, why this issue was still there in |



It's the last take away from #559
close #559