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

git stash save deprecated, need to use git push #3349

Closed
tobiasBora opened this issue Jan 30, 2018 · 4 comments
Closed

git stash save deprecated, need to use git push #3349

tobiasBora opened this issue Jan 30, 2018 · 4 comments

Comments

@tobiasBora
Copy link

tobiasBora commented Jan 30, 2018

Hello,

First, thank you for this great tool. I just wanted to let you know that now git stash save is deprecated, and that git stash push should be used instead. Would it be possible to implement it ? Or maybe there is a reason you chose not to implement it?

Thank you very much!

@phil-s
Copy link
Contributor

phil-s commented Jan 30, 2018

#3200 discusses "git stash push"

Note that Magit implements its own custom stashing features, including stashing just the index, or just the un-staged changes, so there is good flexibility as-is.

As per comments on https://emacs.stackexchange.com/q/38452 , stash push was introduced in Git 2.15.0, while Magit supports Git versions down to 1.9.4, so any support in Magit would need to be version-dependent, and the Magit UI might then vary between installations depending on which Git version was present.

As such, I don't think it would make sense to remove any of the existing functionality/bindings; but potentially stash push could be a separate action when it's available...

@tobiasBora
Copy link
Author

Hum thank you... And I tried to look quickly in the source code and I can't find any reference to "git stash save" (maybe I just miss it?), does that mean that somehow (sorry I'm not a git expert at all, maybe using "git stash create"?) magit completely simulate the "git stash push" command, and therefore does not mind if git stash push is now deprecated ?

@phil-s
Copy link
Contributor

phil-s commented Jan 30, 2018

From my reading, the single difference of note between stash save and stash push is the ability to include optional <pathspec> arguments. You can do this in Magit by using the index: stage the things you wish to stash, and then stash the index.

@tarsius
Copy link
Member

tarsius commented Jan 30, 2018

If we need [--] [pathspec ...], then explain why that is so in #3200.

I don't think we need that and the only other difference between these two subsubcommands is that push is a much worse name than save.

@tarsius tarsius closed this as completed Jan 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants