-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Add more aliases for git branch
, use long form
#2159
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for re-ordering the list.
Looking into the man pages more, gba
and gbr
both result in lists, and I don't think they bring enough value over the gbl*
variants.
In fact I prefer the gbl*
variants as they seem more clear to me and also give the option of providing glob patterns to match against.
Also gbr
could be mistaken as an alias for git branch
and ppl might find it confusing in practice.
So I vote that we lose the gba
and gbr
Agreed. |
I just noted that Hence, we may also let go of |
I think we're getting closing in understanding the ambiguity. Since With I would suggest to then introduce |
Soo .. I never use git blame from cli, but I use the
If we see any value in the It would also be awkward to have For bash-it, I think That said, I could see a potential for a I also think its trivial for users to override aliases in their .bashrc (I override several) and some users (yourself included) will likely override Our goal to reduce all commands to 2-5 characters, by nature, can never please everyone, but I'm glad to have discussions like these. |
Okay, then let's merge the current state of changes. |
I think we're close, but looks like this change hasn't been made yet? |
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy with this, so I'm approving it, but for the one who will decide to merge it or not, let's go over what this change entails:
- Removes
gba
alias [breaking change] - Adds
gbl
,gbla
(replacesgba
) andgblr
aliases - Modifies
gbm
alias to use long options - Re-orders the
# branch
section alphabetically
I am not sure about dropping What do you think @bittner @davidpfarrell ? |
The decision to drop it came from the following discussion above:
I too would argue that I'd naturally use Said that, I'd be happy to re-add both variants. Since |
I am completely fine with adding new variants, but old variants should not be dropped so lightly IMO |
I'm fine leaving it in - I prefer to remove it, but I see your point ... |
I prefer to learn patterns. Rules that I can apply and that work out in a generic way. So, while I'll be re-adding I hope that's fine for you folks. |
Git can list local branches, remote branches, and both of them together. Let's use the long form of the options to make the aliases quicker to understand. As agreed in PR #2159, we introduce gbl and replace gba/gbr by gbla/gblr. gbl/gbla/gblr allow wildcard arguments for filtering branch names.
If that resolves all discussions I'd be happy to see the change merged! 💯 Afterwards, I'd immediately dedicate myself to resolve #2160 (as this is slightly related and touches the same source file). |
Something's broken with bats on macOS 11. Not sure what is is, really: # bats warning: Executed 245 instead of expected 268 tests
Error: Process completed with exit code 1. |
There is something statistical in macos tests, this is unrelated to you |
Thanks @bittner and @davidpfarrell for the review! |
Git can list local branches, remote branches, and both of them together. Let's use the long form of the options to make the aliases quicker to understand. As agreed in PR Bash-it#2159, we introduce gbl and replace gba/gbr by gbla/gblr. gbl/gbla/gblr allow wildcard arguments for filtering branch names.
Git can list local branches, remote branches, and both of them together.
Let's use the long form of the options to make the aliases quicker to understand.
Motivation and Context
Listing remote branches was missing from the
git branch
aliases.How Has This Been Tested?
Not directly from this source code, but I used the aliases before on my local developer machine.
Types of changes
Checklist:
clean_files.txt
and formatted it usinglint_clean_files.sh
.