Skip to content

feat: upgrade git2go bindings to libgit2 v1.9#964

Open
AaronMegs wants to merge 3 commits into
libgit2:mainfrom
AaronMegs:dev-v35-1.9
Open

feat: upgrade git2go bindings to libgit2 v1.9#964
AaronMegs wants to merge 3 commits into
libgit2:mainfrom
AaronMegs:dev-v35-1.9

Conversation

@AaronMegs

Copy link
Copy Markdown

Breaking API changes:

  • git_blame_get_hunk_byindex -> git_blame_hunk_byindex
  • git_blame_get_hunk_byline -> git_blame_hunk_byline
  • git_blame_get_hunk_count -> git_blame_hunkcount
  • git_indexer_hash -> git_indexer_name (returns string instead of git_oid)
  • Add #include <git2/sys/errors.h> for git_error_set_str

New bindings:

  • HomeDir / SetHomeDir
  • ServerConnectTimeout / SetServerConnectTimeout
  • ServerTimeout / SetServerTimeout
  • Mempack.ObjectCount / Mempack.WriteThinPack
  • ConfigEntry.BackendType / ConfigEntry.OriginPath
  • Repository.CreateCommitFromStage with CommitCreateOptions
  • Repository.CommitParents
  • Repository.DefaultSignatureFromEnv
  • StashCollection.SaveWithOptions with pathspec support
  • CheckoutDryRun / CheckoutConflictStyleZdiff3

Bug fixes:

  • Fix recursive fmt.Sprintf in CredentialType.String()

Test updates:

  • Replace hardcoded "master" branch name with dynamic defaultBranchName() helper to support systems where default branch is "main"
  • Add tests for all new bindings in corresponding test files
  • Split new API tests into settings_test.go, mempack_test.go, config_test.go, commit_test.go, repository_test.go, stash_test.go, and signature_test.go

Breaking API changes:
- git_blame_get_hunk_byindex -> git_blame_hunk_byindex
- git_blame_get_hunk_byline -> git_blame_hunk_byline
- git_blame_get_hunk_count -> git_blame_hunkcount
- git_indexer_hash -> git_indexer_name (returns string instead of git_oid)
- Add #include <git2/sys/errors.h> for git_error_set_str

New bindings:
- HomeDir / SetHomeDir
- ServerConnectTimeout / SetServerConnectTimeout
- ServerTimeout / SetServerTimeout
- Mempack.ObjectCount / Mempack.WriteThinPack
- ConfigEntry.BackendType / ConfigEntry.OriginPath
- Repository.CreateCommitFromStage with CommitCreateOptions
- Repository.CommitParents
- Repository.DefaultSignatureFromEnv
- StashCollection.SaveWithOptions with pathspec support
- CheckoutDryRun / CheckoutConflictStyleZdiff3

Bug fixes:
- Fix recursive fmt.Sprintf in CredentialType.String()

Test updates:
- Replace hardcoded "master" branch name with dynamic defaultBranchName()
  helper to support systems where default branch is "main"
- Add tests for all new bindings in corresponding test files
- Split new API tests into settings_test.go, mempack_test.go,
  config_test.go, commit_test.go, repository_test.go, stash_test.go,
  and signature_test.go
Comment thread vendor/libgit2

@mechanicker mechanicker left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not a regular user/reviewer of git2go. However, Go binding to libgit2 has been largely abandoned and would love to see a revival.

@AaronMegs

Copy link
Copy Markdown
Author

Upgrade libgit2 binding to v1.9.3.

@AaronMegs

Copy link
Copy Markdown
Author

This version has been running stably in our product for nearly two months, so we are confident in this upgrade.

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.

2 participants