-
Notifications
You must be signed in to change notification settings - Fork 22
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
Allow selecting a sub-tree to draw instead, based on refspecs #55
Comments
Let me see if I understand. You want to narrow down the graph to scope the list of refspecs you passed as argument, right? master A B Draw the place where they diverged at the bottom of the graph, and draw the place where they merged at the top. Don't draw anything else. Just see the related commits. I've seen on the code that it is using a walker to navigate the commits of the repository. I've started this git_explorer project because I wanted to do something like you want: I'd like a tool to interactively draw the commits in a terminal and expand/collapse branches. But then I found this project that is much more advanced than mine. We need to investigate if there is a way to tell the walker to stop navigating if it founds the conditions you described, and to not draw commits that don't belong to the branches you passed as argument. If you have a resource please share it to see what can I do. |
@KarlHeitmann I think I do not really understand what the OP suggests/requests here. |
Hello @mlange-42, My suggestion is to create a localized graph visualization that focuses only on the specific refspecs (references to commits, branches, or tags in Git) that are provided as arguments. In my example, This request arises from a desire to simplify the graph visualization, making it easier to track the relationship and evolution of specific branches, especially in complex repositories with many branches. The challenge is that the current graph-drawing mechanism doesn't have a way to restrict or scope the graph to these specific branches or refspecs, and stops drawing at the nth line rather than parsing and drawing up to the nth commit. Hope this explanation helps! |
Allow a vararg listing of refspecs, and visualize all n-1 refspecs with regards to the merge-base of the 1st refspec.
Or, in lay-mans terms: I have a main and two branches that were incrementally merged to main. I'd like the subgraph that tracs merge-base of all of the aforementioned refspecs on the bottom, the origin/main on top, and in-between the paths that those branches create with regards to main.
tl;dr:
Workarounds considered:
git-graph -n 3
, but-n 3
is not likegit log -3
:git-graph
simply stops drawing at the 3rd line, instead of parsing+drawingHEAD~3..
. If you have a branch that's newer than the(origin/)master
, then(origin/)master
is not even visibleThe text was updated successfully, but these errors were encountered: