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

Add git commit --no-edit aliases and fix git commit --signed alias name #4830

Merged
merged 1 commit into from May 14, 2016

Conversation

wanbok
Copy link
Contributor

@wanbok wanbok commented Feb 6, 2016

This PR fixes #4827 .

  • gcan! is gcan! without -s.
  • gcans! is gcan! -s.
  • gcn!(gc! --no-edit) is added.

alias gca='git commit -v -a'
alias gca!='git commit -v -a --amend'
alias gcane!='git commit -v -a --no-edit --amend'
alias gcan!='git commit -v -a -s --no-edit --amend'
Copy link
Contributor

Choose a reason for hiding this comment

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

actually I would prefer

alias gcan!='git commit -v -a --no-edit --amend'
alias gcans!='git commit -v -a --amend -s --no-edit'

@wanbok
Copy link
Contributor Author

wanbok commented Feb 6, 2016

@stibbons Check this commit, apply your prefer. :)

@gsemet
Copy link
Contributor

gsemet commented Feb 7, 2016

i don't have rights to submit, what others think?

@mcornella mcornella changed the title Add 'gcn!' and 'gcane!' for the '--no-edit' option Add git commit --no-edit aliases and fix git commit --signed alias name Feb 7, 2016
@mcornella
Copy link
Member

@stibbons quoting the comment at #4827 (comment):

I also agree, this would break user workflow, and adding this signature is a good practice to set up (signature might be different from the user that push the commit).

I agree with the naming suggested, but as agreed it will break the workflow if anyone is using the gcan! alias. As of right now I only know of you and @wanbok, but it's irresponsible to thing there's nobody else using it. It's particulary troublesome in this case because the --no-edit means the user won't notice that he's not signing off the commit.

Also, Oh My Zsh doesn't have a good method to deprecate or warn users of alias changes, so let's keep the gcan! alias as is and add gcane! for the time being. We can also add gcans! and instruct people to use that, as the other one might be deprecated.

@gsemet
Copy link
Contributor

gsemet commented Feb 8, 2016

You're right on the point omz doesn't have an alias change signaling feature.

Both solution are ok for me, I can adapt. For alias consistency sake, gcan! + gcans! is right. For user experience consistency sale, gcan! + gcane! is right....
Damned, it is an important choice, should be the author of the project to decide.

@wanbok wanbok force-pushed the wanbok-git-commit branch 2 times, most recently from d7ede22 to 4f0d49b Compare February 9, 2016 15:58
@wanbok
Copy link
Contributor Author

wanbok commented Feb 9, 2016

I agreed with @mcornella. So I've tried to warn users of alias changes. like this: Deprecated message

And also, gcane! is added again.

@gsemet
Copy link
Contributor

gsemet commented Feb 9, 2016

-1 hum... should be warned only for some days, or allow user to disable it after a while...

@wanbok
Copy link
Contributor Author

wanbok commented Feb 9, 2016

User can avoid this message by using gcans!.
I think If a command(or alias) is deprecated, it should be uncomfortably used.
And It should always make users be noticed when users trying to use a deprecated command.

@mcornella mcornella mentioned this pull request Mar 19, 2016
@wanbok
Copy link
Contributor Author

wanbok commented Mar 28, 2016

@mcornella Any plans for this PR? If it should not notice the deprecated message, i can modify it.

@mcornella mcornella added new Topic: alias Pull Request or issue regarding aliases labels Mar 30, 2016
@mcornella
Copy link
Member

Sorry, I've been a little busy. I would remove the gcan! alias and turn it into a function. That way it's more readable.

Remove the '-s' option from 'gcan!'
Add 'gcans!'. It is the same as the current 'gcan! -s'.
@wanbok wanbok force-pushed the wanbok-git-commit branch 2 times, most recently from 313f00e to abc29e2 Compare May 9, 2016 05:24
@wanbok
Copy link
Contributor Author

wanbok commented May 9, 2016

Update this commit. please check it out. @mcornella

@mcornella
Copy link
Member

Ok let's pull this in, thanks.

@mcornella mcornella merged commit 615af65 into ohmyzsh:master May 14, 2016
foobacca pushed a commit to foobacca/oh-my-zsh that referenced this pull request May 14, 2016
* upstream/master:
  Fix deprecated usage (ohmyzsh#5050)
  Add 'gcn!' for the '--no-edit' option. (ohmyzsh#4830)
  Add mvn options to ignore test failures (ohmyzsh#5092)
  Add README to meteor plugin
  Add meteor plugin aliases
  Reword and clarify example.zsh custom file
  Tidy up gitignore file
  Use .gitkeep files to keep cache/ and log/ directories
  Rename license to LICENSE.txt for consistency
  Rename README.markdown to README.md for consistency
  Reword and fix formatting of mvn plugin README
  Add README file for mvn plugin
  This plugin also includes tab completions
  Cleanup theme-and-appearance.zsh
  Delete cdablevars option by default
  [TASK] Vagrant plugin: Add missing vagrant snapshot command
modprobe pushed a commit to modprobe/oh-my-zsh that referenced this pull request May 21, 2016
Remove the '-s' option from 'gcan!'
Add 'gcans!'. It is the same as the current 'gcan! -s'.
freecastle added a commit to freecastle/oh-my-zsh that referenced this pull request May 24, 2016
* 'master' of https://github.com/robbyrussell/oh-my-zsh: (33 commits)
  added assembly alias (ohmyzsh#5107)
  Fix styling in cakephp3 completion
  Better cake3 completion
  Change vim command to $EDITOR for consistency (ohmyzsh#5063)
  fixed bower completion error from issue ohmyzsh#2694 (ohmyzsh#5056)
  vagrant snapshot (ohmyzsh#5032)
  Arcanist plugin (ohmyzsh#5106)
  completion: zsh: improve main function selection
  gitfast: fix the prompt colour
  gitfast: update to upstream v2.8
  Add alias for oneline git tree with --all option
  gitfast: update to upstream v2.4
  gitfast: update to upstream v2.0
  znt: update to v2.1.15
  Add rbenv support for ruby version display
  Fix deprecated usage (ohmyzsh#5050)
  Add 'gcn!' for the '--no-edit' option. (ohmyzsh#4830)
  Add mvn options to ignore test failures (ohmyzsh#5092)
  Add README to meteor plugin
  Add meteor plugin aliases
  ...
rakeshbala pushed a commit to rakeshbala/oh-my-zsh that referenced this pull request Jun 6, 2016
Remove the '-s' option from 'gcan!'
Add 'gcans!'. It is the same as the current 'gcan! -s'.
atsuya pushed a commit to atsuya/oh-my-zsh that referenced this pull request Jul 23, 2016
Remove the '-s' option from 'gcan!'
Add 'gcans!'. It is the same as the current 'gcan! -s'.
DennisDenuto pushed a commit to DennisDenuto/oh-my-zsh that referenced this pull request Oct 29, 2016
Remove the '-s' option from 'gcan!'
Add 'gcans!'. It is the same as the current 'gcan! -s'.
avleen pushed a commit to avleen/oh-my-zsh that referenced this pull request Dec 23, 2016
Remove the '-s' option from 'gcan!'
Add 'gcans!'. It is the same as the current 'gcan! -s'.
banzera added a commit to banzera/oh-my-zsh that referenced this pull request Aug 11, 2017
* 'master' of https://github.com/robbyrussell/oh-my-zsh: (71 commits)
  added assembly alias (ohmyzsh#5107)
  Fix styling in cakephp3 completion
  Better cake3 completion
  Change vim command to $EDITOR for consistency (ohmyzsh#5063)
  fixed bower completion error from issue ohmyzsh#2694 (ohmyzsh#5056)
  vagrant snapshot (ohmyzsh#5032)
  Arcanist plugin (ohmyzsh#5106)
  completion: zsh: improve main function selection
  gitfast: fix the prompt colour
  gitfast: update to upstream v2.8
  Add alias for oneline git tree with --all option
  gitfast: update to upstream v2.4
  gitfast: update to upstream v2.0
  znt: update to v2.1.15
  Add rbenv support for ruby version display
  Fix deprecated usage (ohmyzsh#5050)
  Add 'gcn!' for the '--no-edit' option. (ohmyzsh#4830)
  Add mvn options to ignore test failures (ohmyzsh#5092)
  Add README to meteor plugin
  Add meteor plugin aliases
  ...
seth-cohen pushed a commit to seth-cohen/oh-my-zsh that referenced this pull request Oct 29, 2018
Remove the '-s' option from 'gcan!'
Add 'gcans!'. It is the same as the current 'gcan! -s'.
jmartindf pushed a commit to jmartindf/oh-my-zsh that referenced this pull request Nov 10, 2018
Remove the '-s' option from 'gcan!'
Add 'gcans!'. It is the same as the current 'gcan! -s'.
spiliopoulos pushed a commit to spiliopoulos/zsh-config that referenced this pull request Jun 17, 2020
Remove the '-s' option from 'gcan!'
Add 'gcans!'. It is the same as the current 'gcan! -s'.
Luxcium added a commit to LuxciumProject/ahmyzsh that referenced this pull request Sep 20, 2020
https://github.com/ohmyzsh/ohmyzsh/blob/93c837fec8e9fe61509b9dff9e909e84f7ebe32d/plugins/git/git.plugin.zsh#L1-L293

Copyright (c) 2009-2020 Robby Russell and
[contributors](https://github.com/ohmyzsh/ohmyzsh/contributors)

TAnks to those who have contributed to fix those 20+ issues:

ohmyzsh/ohmyzsh#1790
ohmyzsh/ohmyzsh#3535
ohmyzsh/ohmyzsh#3682
ohmyzsh/ohmyzsh#3962
ohmyzsh/ohmyzsh#3972
ohmyzsh/ohmyzsh#3977
ohmyzsh/ohmyzsh#3991
ohmyzsh/ohmyzsh#4085
ohmyzsh/ohmyzsh#4727
ohmyzsh/ohmyzsh#5130
ohmyzsh/ohmyzsh#5179
ohmyzsh/ohmyzsh#5362
ohmyzsh/ohmyzsh#5442
ohmyzsh/ohmyzsh#6329
ohmyzsh/ohmyzsh#6793
ohmyzsh/ohmyzsh#7682
ohmyzsh/ohmyzsh#7716
ohmyzsh/ohmyzsh#7754
ohmyzsh/ohmyzsh#867
ohmyzsh/ohmyzsh#9103
ohmyzsh/ohmyzsh#9114

and those who help develop
theses aliases and function
whith theses Pull 40+ Requests:

ohmyzsh/ohmyzsh#2790
ohmyzsh/ohmyzsh#3167
ohmyzsh/ohmyzsh#4304
ohmyzsh/ohmyzsh#4751
ohmyzsh/ohmyzsh#4830
ohmyzsh/ohmyzsh#4993
ohmyzsh/ohmyzsh#5025
ohmyzsh/ohmyzsh#5178
ohmyzsh/ohmyzsh#5271
ohmyzsh/ohmyzsh#5287
ohmyzsh/ohmyzsh#5306
ohmyzsh/ohmyzsh#5307
ohmyzsh/ohmyzsh#5390
ohmyzsh/ohmyzsh#5417
ohmyzsh/ohmyzsh#5433
ohmyzsh/ohmyzsh#5511
ohmyzsh/ohmyzsh#5591
ohmyzsh/ohmyzsh#5643
ohmyzsh/ohmyzsh#5729
ohmyzsh/ohmyzsh#5844
ohmyzsh/ohmyzsh#5849
ohmyzsh/ohmyzsh#5871
ohmyzsh/ohmyzsh#6006
ohmyzsh/ohmyzsh#6031
ohmyzsh/ohmyzsh#6059
ohmyzsh/ohmyzsh#6079
ohmyzsh/ohmyzsh#6297
ohmyzsh/ohmyzsh#6378
ohmyzsh/ohmyzsh#6789
ohmyzsh/ohmyzsh#6791
ohmyzsh/ohmyzsh#6893
ohmyzsh/ohmyzsh#7064
ohmyzsh/ohmyzsh#7472
ohmyzsh/ohmyzsh#7556
ohmyzsh/ohmyzsh#7629
ohmyzsh/ohmyzsh#7630
ohmyzsh/ohmyzsh#7724
ohmyzsh/ohmyzsh#7841
ohmyzsh/ohmyzsh#8089
ohmyzsh/ohmyzsh#8563
ohmyzsh/ohmyzsh#8617
ohmyzsh/ohmyzsh#8622
ohmyzsh/ohmyzsh#8697
ohmyzsh/ohmyzsh#8902
ohmyzsh/ohmyzsh#8935
ohmyzsh/ohmyzsh#8957
ohmyzsh/ohmyzsh#9049
Signed-off-by: Benjamin Vincent (Luxcium) <luxcium@neb401.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Topic: alias Pull Request or issue regarding aliases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Why gcan! has -s option?
3 participants