Skip to content

smartlog: replace --reverse flag with config opt#1315

Merged
claytonrcarter merged 4 commits intoarxanas:masterfrom
e-q:reverse-opt
Feb 26, 2026
Merged

smartlog: replace --reverse flag with config opt#1315
claytonrcarter merged 4 commits intoarxanas:masterfrom
e-q:reverse-opt

Conversation

@e-q
Copy link
Copy Markdown
Contributor

@e-q e-q commented May 20, 2024

My perspective, based on my own experience, is that folks generally stick to one log orientation/direction. In principle, the reverse flag can be incorporated by default via an alias, but this doesn’t catch the auto-smartlog that is emitted after some operations.

This PR adds a Boolean configuration option that replaces the —reverse flag: branchless.smartlog.reverse

This is a breaking CLI change, so I don’t imagine this would incorporated as-is. However, I didn’t want to go too far down this path without considering your thoughts and opinions on how a configuration option may be incorporated. (Not to mention my very limited Rust experience 😅)

What do you think? Thanks for all your work on such a helpful tool!

@arxanas
Copy link
Copy Markdown
Owner

arxanas commented May 26, 2024

A configuration option makes sense to me, since I've never once wanted to enable it for git-branchless and never once wanted to disable the equivalent option for jj 😅.

The git-branchless-smartlog output isn't really meant to be machine parseable (you can use git-branchless-query for that), so I'm optimistic that nobody's workflow would be broken by this. I posted in git-branchless Discord and jj Discord as well to see if anyone had any thoughts.

If we're worried about it, we could make the command-line flag deprecated (print a warning when used) but continue to support it.

@e-q e-q force-pushed the reverse-opt branch 2 times, most recently from 8aeb3cc to 6135b32 Compare May 28, 2024 14:35
@e-q
Copy link
Copy Markdown
Contributor Author

e-q commented May 28, 2024

Thanks for considering this! I’ve added a commit that puts the CLI flag back, and prints a deprecation warning. Feel free to modify this as you see fit.

@kevinmost
Copy link
Copy Markdown

Hi! Any blockers to merging this? I was just writing up a discussion topic requesting this exact config flag. :)

@claytonrcarter claytonrcarter force-pushed the reverse-opt branch 2 times, most recently from 6fe6cd6 to 2fe3943 Compare February 26, 2026 16:46
@claytonrcarter
Copy link
Copy Markdown
Collaborator

@e-q Thank you for working on this and sorry for the long delay in review and merge. I've rebased this and added my own commit w/ some changes from review. Nothing major.

Thank you!

Hi! Any blockers to merging this? I was just writing up a discussion topic requesting this exact config flag. :)

@kevinmost Nope!

@claytonrcarter claytonrcarter enabled auto-merge (squash) February 26, 2026 16:55
@claytonrcarter claytonrcarter merged commit 0dd5c07 into arxanas:master Feb 26, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants