-
Notifications
You must be signed in to change notification settings - Fork 0
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
Log should list ALL commits from any branch similar to git log --all
#55
Comments
@raghubetina I'm not sure how we'd do that using the gem at least. It doesn't seem possible to get the graph itself. Unless you're referring to building the graph by going to each branch and grabbing all the commits? That sounds... intense 😯 |
@jelaniwoods Yes indeed, that is what I was referring to. Traversing the graph ourselves — y'know, computer science stuff! Once every two years or so, there comes a chance to use it. Commit by commit, if necessary. This is how git itself does it — each commit knows who its parent(s) is, and git follows that back to draw the log or graph. I don't know what commands are available in the gem, but I speculate that we could simplify producing the graph with something like:
I also speculate that there are a bunch of JS libraries out there that can help draw the tree, once we have it in a suitable data structure. Just spitballin' though. |
@jelaniwoods Just checking in on this — any progress? I would like to do a session on how to jump back and forth between commits this week or next. I'm happy to pair on this one together. |
@raghubetina I made some progress. I have a list of Hashes, where each Hash represents a branch. The Hash has a key for branch name, HEAD, and an Array of all the commit SHA's from the branch. I've combined them into one list of all commit SHAs but still need to find the HEADs of all branches and verify the order of the commits. |
@jelaniwoods Okay. If we iterate over each branch and do a |
@raghubetina I assumed that would be the case, but either I made an error with the logic somewhere or |
@jelaniwoods Where do we stand on drawing all the branches simultaneously in web_git? |
@raghubetina ah! I didn't see this. I had paused this since last quarter. I believe the last issue to figure out is the order to create the branches, since the graphing library needs to create branches at specific times. I'll focus back on this. |
Doesn't look like this is easy to do by default with the
git
gem.The
log
method only supports acount
paramaterhttps://github.com/ruby-git/ruby-git/blob/861eb71e1c266606eefacf7ebd4bee4f34bee5de/lib/git/base/factory.rb#L39-L42
The
log_commits
method supports a few flags, but notall
.https://github.com/ruby-git/ruby-git/blob/861eb71e1c266606eefacf7ebd4bee4f34bee5de/lib/git/lib.rb#L129-L137
https://github.com/ruby-git/ruby-git/blob/861eb71e1c266606eefacf7ebd4bee4f34bee5de/lib/git/lib.rb#L1022-L1034
The text was updated successfully, but these errors were encountered: