node-gitteh
node-gitteh copied to clipboard
Revision Walking
Does the latest refactored code support revision walking? I cloned and compiled the code on my machine from the master branch and after running cake build, the gitteh.js file created didn't have any method to create a walker on the Repository object. Can you please let me know if I went wrong somewhere or whether it will be added in the future?
@vdurbha
This was present in the original implementation of gitteh, I haven't yet gotten around to re-adding it in the latest version (which was nearly a complete rewrite).
Technically you can still revision walk without the actual revwalk API however. All you need to do is grab HEAD
and follow it's parent commits. That being said, I do want to re-add this as soon as possible.
I'll keep this issue open and update once revwalk returns.
-Sam
Great. Thanks. Yes I was able to grab HEAD and follow the parents. I guess the only reason to use Walker would be to sort the entries I guess. I'll give it a shot when it becomes available.
This is being done as part of the cleanup, see #29.
I needed such functionality and implemented it myself in a separate package — https://github.com/andreypopp/gitteh-log/blob/master/index.coffee
See previousCommitsSeq
function which returns a lazy sequence (provided by reduced
package) of commits previous to a provided one as an argument. it's not as straightforward as simple event emitter but I've found lazy sequences to be much more nicer API.