feat: add first debug version of gix branch list#2142
Conversation
|
Thanks a lot! Something I'd be interested in learning is what motivates this functionality. Either it helps with debugging possibly by adding specialty features, or it's a long-wanted improvement because it's what you think
Indeed, |
|
The initial motivation for this addition is me trying to oxidize reading branches in |
There was a problem hiding this comment.
Let's add the "getting acquainted with the API" to the list of great motivations :) - something I want to avoid is to have these subcommand 'just because'.
Regarding the origin/HEAD being auto-resolved - I wouldn't expect that, it should list it as ordinary ref and its target() would be a symbolic reference (usually), that has to be resolved in a separate step.
To add a bit of context/background: another motivation creating this (and similar) PRs is having a minimal working reference implementation of a certain set of APIs. In my experience, there are so many overlapping and intertwined concepts in the git space that, when I start working an a new area, I often miss simple examples that allow me to discover how the different layers interact. I really like that
This was me setting myself a trap, basically. :-) In the code that was causing the ”issue”, I had a |
Loving that! And like always, the
This probably means a fix is in order. There are other functions like it that are called |
Sebastian Thiel (Byron)
left a comment
There was a problem hiding this comment.
Thanks, this works!
I also learned that pub mod x {}; fn x() {} are perfectly valid, and I never ever did that myself for some reason. Definitely learned something and think this a pattern to repeat.
Regarding the "I missed this during my review", I certainly should have been more specific as it's a copy-paste bug you also seem to have missed when marking it done :D.
Absolutely! :-D I was so convinced that the comment was a duplicate of another one that I didn’t read it carefully enough. |
This is a draft PR even though I feel it is already 95 % done. I mainly want to get CI feedback early.
This PR adds
gix branch listandgix branch, supporting--allas the only flag.I copied the way
gix tag listandgix tagswork, but I’m less sure this is a good idea in this case as passing arguments seems to become trickier. Given the current code,gix branch list --alldoes not work, butgix branch --all listdoes which seems sub-optimal to me. What do you think?