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

feat: add reverse option to git-brv #1123

Merged
merged 5 commits into from Dec 16, 2023
Merged

feat: add reverse option to git-brv #1123

merged 5 commits into from Dec 16, 2023

Conversation

joshka
Copy link
Contributor

@joshka joshka commented Dec 12, 2023

When there are a large amount of branches it is often useful to see the
most recent branches last as they end up closer to the prompt. This adds
a new --reverse / -r option and an environment variable to set the
default behavior (GIT_BRV_REVERSE).


❯ bin/git-brv
2023-12-11 main origin/main 93a32cf feat: add reverse option to git-brv
2023-11-30 foo              28b48c7 chore: add poetry to handle the tests of the git extras (#1121)

❯ bin/git-brv -r
2023-11-30 foo              28b48c7 chore: add poetry to handle the tests of the git extras (#1121)
2023-12-11 main origin/main 93a32cf feat: add reverse option to git-brv

❯ bin/git-brv --reverse
2023-11-30 foo              28b48c7 chore: add poetry to handle the tests of the git extras (#1121)
2023-12-11 main origin/main 93a32cf feat: add reverse option to git-brv

❯ GIT_BRV_REVERSE=false bin/git-brv
2023-12-11 main origin/main 93a32cf feat: add reverse option to git-brv
2023-11-30 foo              28b48c7 chore: add poetry to handle the tests of the git extras (#1121)

❯ GIT_BRV_REVERSE=true bin/git-brv
2023-11-30 foo              28b48c7 chore: add poetry to handle the tests of the git extras (#1121)
2023-12-11 main origin/main 93a32cf feat: add reverse option to git-brv

❯ GIT_BRV_REVERSE=foo bin/git-brv
2023-11-30 foo              28b48c7 chore: add poetry to handle the tests of the git extras (#1121)
2023-12-11 main origin/main 93a32cf feat: add reverse option to git-brv

When there are a large amount of branches it is often useful to see the
most recent branches last as they end up closer to the prompt. This adds
a new --reverse / -r option and an environment variable to set the
default behavior (GIT_BRV_REVERSE).
man/git-brv.md Outdated Show resolved Hide resolved
bin/git-brv Outdated Show resolved Hide resolved
@joshka
Copy link
Contributor Author

joshka commented Dec 12, 2023

❯ git brv                                                
2023-12-11 main origin/main 93a32cf feat: add reverse option to git-brv
2023-11-30 foo              28b48c7 chore: add poetry to handle the tests of the git extras (#1121)

❯ git brv --reverse
2023-11-30 foo              28b48c7 chore: add poetry to handle the tests of the git extras (#1121)
2023-12-11 main origin/main 93a32cf feat: add reverse option to git-brv

❯ git brv -r       
2023-11-30 foo              28b48c7 chore: add poetry to handle the tests of the git extras (#1121)
2023-12-11 main origin/main 93a32cf feat: add reverse option to git-brv

❯ git config --local git-extras.brv.reverse true
❯ git brv                                       
2023-11-30 foo              28b48c7 chore: add poetry to handle the tests of the git extras (#1121)
2023-12-11 main origin/main 93a32cf feat: add reverse option to git-brv

❯ git config --local git-extras.brv.reverse false
❯ git brv                                        
2023-12-11 main origin/main 93a32cf feat: add reverse option to git-brv
2023-11-30 foo              28b48c7 chore: add poetry to handle the tests of the git extras (#1121)

❯ git config --unset git-extras.brv.reverse      
❯ git config --global git-extras.brv.reverse true      
❯ git brv                                        
2023-11-30 foo              28b48c7 chore: add poetry to handle the tests of the git extras (#1121)
2023-12-11 main origin/main 93a32cf feat: add reverse option to git-brv

Copy link
Collaborator

@spacewander spacewander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve except for a tiny improvement.

man/git-brv.md Outdated Show resolved Hide resolved
man/git-extras.md Outdated Show resolved Hide resolved
man/git-feature.1 Outdated Show resolved Hide resolved
man/git-feature.md Show resolved Hide resolved
Copy link
Collaborator

@hyperupcall hyperupcall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@spacewander spacewander merged commit 9049967 into tj:main Dec 16, 2023
5 checks passed
@spacewander
Copy link
Collaborator

@joshka
Merged. Thanks!

@joshka
Copy link
Contributor Author

joshka commented Dec 16, 2023

Thank you!

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.

None yet

3 participants