You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 11, 2020. It is now read-only.
First and foremost, this it an awesome package, just what I was looking for! I came across this and spent some time reading the docs, but couldn't find reference to how git-diff can be done, similar to https://godoc.org/github.com/libgit2/git2go#Diff. I noticed that there's https://godoc.org/gopkg.in/src-d/go-git.v3/diff, but this is more for comparison of the contents between a src and dst, which is different from retrieving a list of the diff files between two commits. Is functionality not available in go-git, or did I miss it in the docs?
The text was updated successfully, but these errors were encountered:
The Diff entity is the bare part of the diff, but currently we don't provide a direct method from a commit for retrieve the diff from the previous file or tree. Sorry
@mcuadros@ajnavarro I was actually trying to use this and it is able to create a patch, but for my use-case, I need to create a format the patch with extra lines in the context which we are able to achieve via format-patch option on git cli
-U<n>, --unified=<n>
Generate diffs with <n> lines of context instead of the usual three. Implies --patch.
Is there any similar option available in the library?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
First and foremost, this it an awesome package, just what I was looking for! I came across this and spent some time reading the docs, but couldn't find reference to how git-diff can be done, similar to https://godoc.org/github.com/libgit2/git2go#Diff. I noticed that there's https://godoc.org/gopkg.in/src-d/go-git.v3/diff, but this is more for comparison of the contents between a src and dst, which is different from retrieving a list of the diff files between two commits. Is functionality not available in go-git, or did I miss it in the docs?
The text was updated successfully, but these errors were encountered: