Re: Warning suggestion for git stash drop

2017-07-18 Thread Laurent Humblet
Oh great, an answer 20 days later ... Sorry about this. I have been reading a bit on the topic and found that for Bash we should be using shell functions over aliases so I wrote this function to be simply added to the .bashrc: # 'git stash drop' confirm shell function git() { if [[ $@ == "sta

Re: Warning suggestion for git stash drop

2017-06-30 Thread Junio C Hamano
Laurent Humblet writes: > Thank you for your feedback. > > I suppose that turning a hypothetical confirmation option 'on' would > impact a stash pop for instance as it automatically drops the stash if > it was applied without conflicts. > > What about a --confirm flag? You could then simply alia

Re: Warning suggestion for git stash drop

2017-06-30 Thread Laurent Humblet
Thank you for your feedback. I suppose that turning a hypothetical confirmation option 'on' would impact a stash pop for instance as it automatically drops the stash if it was applied without conflicts. What about a --confirm flag? You could then simply alias 'git stash drop --confirm' locally a

Re: Warning suggestion for git stash drop

2017-06-29 Thread Stefan Beller
On Thu, Jun 29, 2017 at 11:44 AM, Junio C Hamano wrote: > Laurent Humblet writes: > >> Would it be possible to add an optional Yes/No when doing a 'git stash >> drop'? Something similar as what happens when pushing on a remotely >> checked out branch (with a config setting to turn the warning on

Re: Warning suggestion for git stash drop

2017-06-29 Thread Junio C Hamano
Laurent Humblet writes: > Would it be possible to add an optional Yes/No when doing a 'git stash > drop'? Something similar as what happens when pushing on a remotely > checked out branch (with a config setting to turn the warning on/off). > > I know that you can always get your dropped stash ba

Warning suggestion for git stash drop

2017-06-29 Thread Laurent Humblet
Hi all, Would it be possible to add an optional Yes/No when doing a 'git stash drop'? Something similar as what happens when pushing on a remotely checked out branch (with a config setting to turn the warning on/off). I know that you can always get your dropped stash back using git reflog but a