| Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
|
|
Newer commits have changed the build scripts such that the HTTP parser is not
included in the static library.
This also reverts commit ecf4f7a137ba69014d414b8de20eb58e115bfd73.
|
|
|
|
|
|
Buffer allocated in Patch.String() was never freed
Signed-off-by: Can Berk Güder <[email protected]>
|
|
|
|
This change also factor out diffOptionsToC function to remove
duplicated code.
|
|
|
|
pointers to structures for diff detail. add patch error code handling. trim excess data from diff structures.
|
|
|
|
|
|
|
|
This commit adds barebones capacity to generate diffs from two trees and
to emit those as git-style diffs (via `Patch.String`), or to enumerate
the files/hunks/lines in the diff to emit the data yourself.
The walk functions have been implemented in the same manner as the Odb
walking methods.
Note that not all of the functionality is implemented for either the
`git_diff_*` nor the `git_patch_*` functions, and there are unexposed
constants which would likely be useful to add.
|