-
-
Notifications
You must be signed in to change notification settings - Fork 971
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 support #317
Comments
How would you display it? I'm not a big fan of the suggestion. I usually have something in my git stash and would be annoyed by the constant reminder as I don't use it for storing important stuff, it's a temporary workspace. Just for pure I have 38 stashes, first one from |
Just an indicator like $ or something. Maybe it would remind you to take
care of clearing
…On Apr 20, 2017 4:02 AM, "Mathias Fredriksson" ***@***.***> wrote:
How would you display it?
I'm not a big fan of the suggestion. I usually have something in my git
stash and would be annoyed by the constant reminder as I don't use it for
storing important stuff, it's a temporary workspace.
Just for pure I have 38 stashes, first one from Mon Feb 23 15:33:22 2015
😝.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#317 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA8cCGeeTYwG28ypn2HosU8YxPo9Y-vCks5rxx8WgaJpZM4NCh1_>
.
|
For me it would be more of a nag to get rid of my stash, which I don't want. Most of it is junk, but I keep some things in there for a reason. E.g. dead-ends I might to re-visit or otherwise keep handy in case I need it in the future. |
I'm also 👎 |
Wouldn't that make more sense as a local branch? |
Some things aren't worth the effort to turn into a branch. Either way, stash is part of my workflow and I have no plans on changing how I use it 🙂. I'm sorry if this inconveniences you @leoj3n, but I don't think we're going to implement this. This issue has now been open for 2.5 months without any up-votes. There is also no benefit to keeping a clean stash, so I see reminding people as a negative. I've already voiced my other concerns so I wont repeat those. |
I guess it would annoy some people, but it would remind me not to blow away important changes! 😅
No worries, not having a git stash prompt indicator won't inconvenience me that much (in turn, I'm sorry if this feature suggestion inconvenienced you!). Thanks for your consideration regardless.
I didn't make this issue to argue that there were any benefits to "keeping a clean stash"; I just thought that was something you were struggling with, based on what you posted @mafredri ... The primary impetus, and reason I made the issue originally, is because I accidentally blew away a local repo's directory that had changes in stash that I had forgotten about. The repo was up to date with master, it had no new branches, and Now, it is of course my duty as a good developer to always remember to check the stash before blowing away a directory, and this mistake caused me enough pain that I will hopefully remember to check in the future, but I still think the suggestion would have saved me here. Programmers can be lazy, and sometimes do use
Again, just to reiterate, I didn't make this issue to change how you use Although I thought this would be a pretty useful improvement, the absence of a prompt indicator for git stash won't be a huge inconvenience, because I can still think of other measures to remind you of a forgotten stash, such as aliasing I think aliasing |
@mafredri Sorry if the original issue wasn't clear about wanting the indicator to prevent forgetting a repo has stashes. As someone who rarely uses |
Thanks for the writeup @leoj3n and sorry about your bad experience, it can be painful when work done is lost (at least pain teaches us a lot). Your last two comments did help put this feature request in a different perspective, so thanks for that. Also, don't worry, this hasn't inconvenienced me in any way, I would encourage our users to come up with ideas/ways to make Pure even more awesome. It's unfortunate that this feature request doesn't quite align with our vision for Pure. It's a fine balance between adding useful features and create a (visually) noisy prompt. We also want to keep options to a minimum, any feature that requires an option needs to be evaluated with extra care. One option you have is to utilize the right prompt, e.g.
This is something I'm actively thinking about (e.g. allowing power users to hook in and make modifications). That said, I'm not dedicating many braincells to it, just constantly keeping it in the back of my head. I've yet to come up with a solution I'm satisfied with. PS. If you use macOS and Time Machine backups there's a chance you could recover your deleted repository from the past, just thought I'd mention 🙂 . |
I strongly agree with pure staying pure and every new feature being (very) carefully discussed before implemented/accepted. But in my workflow, I am more comfortable if I know when my local modifications are not backuped. So this is my horrible quick and dirty improvement of @mafredri RPROMPT='$(if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then \
s=$(git stash list|wc -l); \
if (( s != 0 )); then \
echo "(stash: $s)"; \
fi; \
fi)' |
Would be cool if the prompt showed an indicator when the current repo has stashes.
The text was updated successfully, but these errors were encountered: