Skip to content

Re-implement using go-git#86

Open
douyun-dtyq wants to merge 2 commits intosplitsh:masterfrom
douyun-dtyq:go-git
Open

Re-implement using go-git#86
douyun-dtyq wants to merge 2 commits intosplitsh:masterfrom
douyun-dtyq:go-git

Conversation

@douyun-dtyq
Copy link
Copy Markdown

git2go is poorly maintained, It's basically impossible to use standard go build to build it now. It also needs cgo to link with libgit2, which brings dependency

So, I decided to re-implement this using go-git.

Cursor ported state.go (agent mode, so maybe with poor performance), and I did the rest manually (with "tabs" only).

It’s mostly passing unit tests and run-tests.sh, but there's a small issue with mergeTest. The SHA1 hash doesn't match the hard-coded one in the test. But this implementation actually matches the official git subtree result and the original libgit implementation,

douyun-dtyq and others added 2 commits March 13, 2026 16:30
I've got tired of building static libgit2 and fighting with git2go and
cgo.

state.go is rewrote by cursor, tested with run-tests.sh and unit tests

Co-authored-by: Cursor <support@cursor.sh>
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.

1 participant