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 stash completions to git show and git diff #9871

Merged
merged 1 commit into from Jul 5, 2023

Conversation

m4rch3n1ng
Copy link
Contributor

@m4rch3n1ng m4rch3n1ng commented Jul 4, 2023

Description

you can use git show and git diff with stashes

$ git show stash@{1}
$ git diff stash@{0} stash@{1}
$ git diff stash@{0}

this adds completions to those
especially the former (git show) is fairly useful because git stash show only shows like with --stat

notes:

  • you can also git checkout and git switch --detach (to) stashes, but i didn't want to encourage that, as you should probably use git stash apply or git stash pop, so you aren't missing new commits you added since creating the stash. if you want me to i can add that as well
  • technically this should also apply to git cherry-pick (and probably git cherry) but that should probably be done via git stash apply, so i didn't add it
$ git cherry-pick stash@{1} -m 1

TODOs:

  • Changes to fish usage are reflected in user documentation/manpages.
  • Tests have been added for regressions fixed
  • User-visible changes noted in CHANGELOG.rst

@zanchey zanchey self-assigned this Jul 5, 2023
@zanchey zanchey added this to the fish 3.6.2 milestone Jul 5, 2023
@zanchey zanchey merged commit e3e7ab7 into fish-shell:master Jul 5, 2023
6 of 7 checks passed
@zanchey
Copy link
Member

zanchey commented Jul 5, 2023

Thanks!

@m4rch3n1ng m4rch3n1ng deleted the git-show-stash branch July 5, 2023 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants