lhchavez
14e29a3390
Fix a potential use-after-free in DiffNotifyCallback ( #579 )
...
This change makes the DiffNotifyCallback always use an "unowned"
*git.Diff that does _not_ run the finalizer. Since the underlying
git_diff object is still owned by libgit2, we shouldn't be calling
Diff.Free() on it, even by accident, since that would cause a whole lot
of undefined behavior.
Now instead of storing a reference to a *git.Diff in the intermediate
state while the diff operation is being done, create a brand new
*git.Diff for every callback invocation, and only create a fully-owned
*git.Diff when the diff operation is done and the ownership is
transfered to Go.
(cherry picked from commit c78ae57de6
)
2020-08-16 07:19:09 -07:00
lhchavez
2635b45d90
Add a way to cleanly shut down the library ( #578 )
...
This change adds the Shutdown() method, so that the library can be
cleanly shut down. This helps significanly reduce the amount of noise in
the leak detector.
(cherry picked from commit 619a9c236b
)
2020-08-16 07:19:09 -07:00
lhchavez
1233fdebf5
Update the `README.md` to clarify some aspects of static libgit2 ( #620 )
...
This change improves the documentation surrounding libgit2 static builds
and modules.
Fixes : #618
(cherry picked from commit 9eaf4fed5f
)
2020-08-16 07:19:09 -07:00
Takuji Shimokawa
aea6cff7ac
Provide missing merge flags ( #615 )
...
This change adds two missing merge flags MergeTreeSkipREUC and MergeTreeNoRecursive.
(cherry picked from commit 33dac3d460
)
2020-08-16 07:19:09 -07:00
Jesse Hathaway
250a674787
Add support for parsing git trailers ( #614 )
...
Adds a wrapper for git_message_trailers which returns a slice of trailer
structs.
(cherry picked from commit 5241c72e6e
)
2020-08-16 07:19:09 -07:00
lhchavez
d6ab8729d8
Merge pull request #582 from suhaibmujahid/method-rename
...
It is not Go idiomatic to put Get into the getter's name
(cherry picked from commit 31f877e249
)
2020-08-16 07:19:09 -07:00
lhchavez
8334650b1c
expose options related to caching
...
(cherry picked from commit 8b51d0db8e
)
2020-08-16 07:19:09 -07:00
Suhaib Mujahid
8e87fa7d72
Check nil signature
...
(cherry picked from commit 91d08450b6
)
2020-08-16 07:19:09 -07:00
lhchavez
447d43c57d
Fix SIGSEGV on double free for Cred object
...
This change removes the Go finalizer when passing ownership to libgit2.
Fixes : #553
(cherry picked from commit 0843b826d2
)
2020-08-16 07:19:09 -07:00
Suhaib Mujahid
0dfadb0dd0
Update README.md
...
(cherry picked from commit 3a2102638d
)
2020-08-16 07:19:09 -07:00
lhchavez
59a177dd02
Update README.md
...
Clarifying the versions since we're using Go 1.11 module version rules now.
(cherry picked from commit 2b66c0f9e7
)
2020-08-16 07:19:09 -07:00
lhchavez
891d857c3a
Add the version number to go.mod
...
This is the second take on trying to tag the current release with a Go
version.
(cherry picked from commit a32375a860
)
2020-08-16 07:19:09 -07:00
lhchavez
231f89164b
Merge pull request #542 from slyphon/fix-error-name
...
Resolves issue #541 - typo in error code 'ErrAmbigious'
(cherry picked from commit 30de4b2e26
)
2020-08-16 07:19:09 -07:00
lhchavez
26397cdaea
Fix the DiffFlag type
...
This change makes the underlying type of DiffFlag be uint32 instead of
int. That makes it possible to build on 32-bit systems.
Fixes : #487
(cherry picked from commit 93c4c5b30a
)
2020-08-16 07:19:09 -07:00
lhchavez
395b2a90a4
Add odb.NewOdbBackendLoose()
...
This change adds support for odb.NewOdbBackendLoose(). This, together
with the git.Packbuilder, can do what Mempack does with a lot less
memory.
(cherry picked from commit 91946a5705
)
2020-08-16 07:19:09 -07:00
lhchavez
5acb58e83d
Add support for indexers and alternate odb packfiles
...
This allows for implementations of git servers written in Go.
(cherry picked from commit 05bc5e36ff
)
2020-08-16 07:19:09 -07:00
lhchavez
36b0f8ba75
Merge pull request #429 from josharian/cherrypick-commit
...
cherrypick: wrap git_cherrypick_commit
(cherry picked from commit 45097a857c
)
2020-08-16 07:19:09 -07:00
lhchavez
75daa3227d
Merge pull request #423 from josharian/more-annotated-commit
...
merge: add two missing AnnotatedCommit methods
(cherry picked from commit 21d618136f
)
2020-08-16 07:19:09 -07:00
lhchavez
23e13acf73
Merge pull request #400 from ramanenka/git_index_add_frombuffer
...
Add binding for `git_index_add_frombuffer`
(cherry picked from commit 06764f48dc
)
2020-08-16 07:19:09 -07:00
Richard Burke
5acdcfaf86
Remove Version from RevertOptions
...
Version is defaulted to GIT_REVERT_OPTIONS_VERSION
(cherry picked from commit 4bca045e5a
)
2020-08-16 07:19:09 -07:00
Richard Burke
0b5abad959
Add revert functionality
...
Closes #436
(cherry picked from commit 30c3d0ffe2
)
2020-08-16 07:19:09 -07:00
lhchavez
37230d2697
Free() the copies of repository.LookupXxx()
...
`repository.LookupXxx()` allocate new go `Object`s that have a reference
to a `C.git_object`. Those are then duplicated with `git_object_dup()`,
so the original `Object`s linger unnecessarily until the Go GC kicks in.
This change explicitly calls `Free()` on the originals to avoid
unnecessary accumulation of garbage.
(cherry picked from commit 2bb5930733
)
2020-08-16 07:19:09 -07:00
lhchavez
b6aa16143b
Update CI configuration
...
This change:
* Updates the GitHub actions so that they run different commands for the
dynamic and static flavors of libgit2.
* Updates the .travis.yml file so that it does roughly the same as the
GitHub actions.
* Adds the release-* branches to the CI configurations.
(cherry picked from commit 26edffd5f5
)
2020-08-16 07:19:09 -07:00
lhchavez
15641667bd
Merge pull request #520 from libgit2/actions
...
Setup CI via Actions
(cherry picked from commit f21ecd9e74
)
2020-08-16 07:19:09 -07:00
lhchavez
5bfa93a8dd
Merge pull request #523 from josharian/diff-stringers
...
make Delta and DiffLineType stringers
(cherry picked from commit 11506ab070
)
2020-08-16 07:19:09 -07:00
lhchavez
2ce0cec363
Merge pull request #524 from josharian/doc-params
...
provide param names in DiffForEachFileCallback
(cherry picked from commit 917d8dcb9e
)
2020-08-16 07:19:09 -07:00
lhchavez
61fdd76c76
Merge pull request #503 from jonEbird/static-build-script-cleanup
...
script/build-libgit2-static.sh: correctly set ROOT
(cherry picked from commit aa802a90db
)
2020-08-16 07:19:09 -07:00
Carlos Martín Nieto
e888805c2b
Merge pull request #506 from takuji/git_commit_message_encoding
...
Add git_commit_message_encoding support
(cherry picked from commit b2e2b2f71b
)
2020-08-16 07:19:09 -07:00
Carlos Martín Nieto
bee1068871
Merge pull request #512 from codeocean/diff-to-buf
...
Add Diff.ToBuf wrapping git_diff_to_buf
(cherry picked from commit 4fa9349942
)
2020-08-16 07:19:09 -07:00
Carlos Martín Nieto
544af2b39a
Merge pull request #448 ftrom lhchavez/mempack
...
Add support for mempack
(cherry picked from commit 2f91268f74
)
2020-08-16 07:19:09 -07:00
Carlos Martín Nieto
c1c2b5a730
Merge pull request #466 from lhchavez/repository-create_commit_from_ids
...
Add support for CreateCommitFromIds
(cherry picked from commit 8766f9f36c
)
2020-08-16 07:19:09 -07:00
Carlos Martín Nieto
9fd0d987ae
Merge pull request #477 from lhchavez/patch-1
...
Add support for Go 1.11 modules
(cherry picked from commit 2609f4c6f2
)
2020-08-16 07:19:09 -07:00
Carlos Martín Nieto
a13d27e9c0
Merge pull request #475 from lhchavez/self-contained-build
...
Improve the static build script
(cherry picked from commit b30b050c9c
)
2020-08-16 07:19:09 -07:00
Carlos Martín Nieto
fedb5b8e68
Merge pull request #476 from lhchavez/clean-up-leaked-dir
...
Clean up one leaked temporary directory
(cherry picked from commit e93f34cf18
)
2020-08-16 07:19:09 -07:00
Carlos Martín Nieto
7b1c424572
Merge pull request #420 from josharian/rebase-operation-type-stringer
...
Add RebaseOperationReword, and make RebaseOperationType a stringer
(cherry picked from commit 7ae106611c
)
2020-08-16 07:19:09 -07:00
Carlos Martín Nieto
a07879739f
Merge pull request #445 from rmg/exclusive-pkg-config
...
static: use pkg-config exclusively when using it
(cherry picked from commit bcf325244c
)
2020-08-16 07:19:09 -07:00
Carlos Martín Nieto
d314b459b8
Merge pull request #465 from lhchavez/packbuilder-insert_from_walk
...
Add support for Packbuilder.InsertFromWalk()
(cherry picked from commit b51a90c133
)
2020-08-16 07:19:09 -07:00
Carlos Martín Nieto
eb38aaaeee
Merge pull request #463 from Nivl/patch-1
...
Add index.Clear() to clear the index object
(cherry picked from commit c27981c283
)
2020-08-16 07:19:09 -07:00
Carlos Martín Nieto
97d05a1e4c
Merge pull request #432 from josharian/simplify-oid
...
git: simplify some Oid methods
(cherry picked from commit c740e1d83d
)
2020-08-16 07:19:09 -07:00
Carlos Martín Nieto
13d16e7ac5
Merge pull request #447 from walkenzoy/master
...
git2go: small fixes to odb module
(cherry picked from commit fc1230ba16
)
2020-08-16 07:19:09 -07:00
Carlos Martín Nieto
10ce505588
Merge pull request #425 from josharian/more-merge-file-flags
...
merge: add missing MergeFileFlag constants
(cherry picked from commit e319b9427f
)
2020-08-16 07:19:09 -07:00
Carlos Martín Nieto
da10fee49e
Merge pull request #424 from josharian/sigdoc
...
signature: improve Signature.Offset docs
(cherry picked from commit 7197faee79
)
2020-08-16 07:19:09 -07:00
Carlos Martín Nieto
c74ce46055
Merge pull request #470 from lhchavez/fix-odbreadstream-read
...
Return io.EOF on OdbReadStream.Read()
(cherry picked from commit 7e9128bd58
)
2020-08-16 07:19:09 -07:00
Carlos Martín Nieto
13d27a4f62
Merge pull request #468 from wmedlar/patch-1
...
Fix typo in constant name
(cherry picked from commit 8b368063e9
)
2020-08-16 07:19:09 -07:00
Carlos Martín Nieto
ca9f5b6523
Merge pull request #443 from walkenzoy/master
...
git2go: fix reference iterator leak
(cherry picked from commit 14280de4da
)
2020-08-16 07:19:09 -07:00
lhchavez
6cc7d3dc6a
Merge pull request #526 from dbolkensteyn/v27
...
Fixes #513 - Segfault during tree walk
2020-02-16 07:31:32 -08:00
Carlos Martín Nieto
6ee3a5f589
Merge pull request #529 from libgit2/cmn/bump-libgit2-27
...
Update libgit2 to v0.27.10
2019-12-10 22:41:57 +01:00
Carlos Martín Nieto
f0ad5b44b9
Update libgit2 to v0.27.10
2019-12-10 21:36:08 +00:00
Dinesh Bolkensteyn
53ee1f6e9a
Similar to #513 Fix potential segfault on Tag objects
2019-11-17 17:41:56 +01:00
Dinesh Bolkensteyn
75a20e5aeb
Fixes #513 - Segfault during tree walk
2019-11-17 09:19:36 +01:00