Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revision Walking #26

Open
vdurbha opened this issue Jun 22, 2012 · 4 comments
Open

Revision Walking #26

vdurbha opened this issue Jun 22, 2012 · 4 comments
Labels
Milestone

Comments

@vdurbha
Copy link

vdurbha commented Jun 22, 2012

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?

@samcday
Copy link
Contributor

samcday commented Jul 5, 2012

@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

@vdurbha
Copy link
Author

vdurbha commented Jul 5, 2012

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.

@mildsunrise
Copy link
Contributor

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

@andreypopp
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants