| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
https://github.com/nodegit/nodegit/blob/master/examples/walk-history-for-file.js needs to be updated as well please. |
Sorry, something went wrong.
|
@tbranyen @johnhaley81 once we get this to pass without some random test timing out, this is ready to go by my account. If you guys wanted to give this the once over before I merge in, that would be greatly appreciated. Notes of interest: The fileHistoryWalk will do a rename detection if it discovers a file was added in the history and will return the old file name and the renamed status along with the commit. This helps history users to not only follow the filepath's history, but also see how the content if the file has changed / branched. |
Sorry, something went wrong.
There was a problem hiding this comment.
I don't see these getting freed anywhere. Is this memory cleaned up?
Sorry, something went wrong.
There was a problem hiding this comment.
I can't find whether or not we're supposed to clean it up or not. It would be super helpful if the docs gave me some insight
Sorry, something went wrong.
There was a problem hiding this comment.
If you know explicitly that we're supposed to clean those up, I'll free the. I've been mulling it over myself, because the docs are not clear!
Sorry, something went wrong.
There was a problem hiding this comment.
Yes we do need to free it: https://github.com/libgit2/libgit2/blob/v0.23.4/include/git2/diff.h#L23-L28
Sorry, something went wrong.
There was a problem hiding this comment.
oh cool! I guess since it's explained there they don't have to explain it in the function documentation for tree to tree.
Sorry, something went wrong.
|
Other then the potential memory leak above, could you get some comment blocks into lib/revwalk/js for docs? |
Sorry, something went wrong.
Only find similar if there is an added entry Free diffs when we are done with them.
| } | ||
| } | ||
|
|
||
| git_diff_free(diffs); |
There was a problem hiding this comment.
Freeing diffs down here now.
Sorry, something went wrong.
|
@johnhaley81 @tbranyen what is going on with this test? https://travis-ci.org/nodegit/nodegit/jobs/106996362 |
Sorry, something went wrong.
Implement file history walk in revwalk
| Back | FazBrowse Home | New Git URL |
Implementing file history walk for revwalk. You pass it a sha, it then traverses until it either finds the 'added' entry for the file OR it hits the max number of commits to search for history.