node-gitteh icon indicating copy to clipboard operation
node-gitteh copied to clipboard

Revision Walking

Open vdurbha opened this issue 12 years ago • 4 comments

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 avatar Jun 22 '12 08:06 vdurbha

@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

samcday avatar Jul 05 '12 11:07 samcday

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.

vdurbha avatar Jul 05 '12 12:07 vdurbha

This is being done as part of the cleanup, see #29.

mildsunrise avatar Aug 17 '12 16:08 mildsunrise

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.

andreypopp avatar Jul 04 '13 17:07 andreypopp