Re: [PATCH] Showing stash state in bash prompt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano wrote:
> Daniel Trstenjak <Daniel.Trstenjak@xxxxxxxxxxxxxxxxxxxx> writes:
> 
> > Showing stash state in bash prompt.
[...]
> 	Subject: [PATCH] completion: show presense of stashed changes
> 
> 	Users often forget that there are stashed changes that want to be
> 	unstashed.  Add a '$' in the prompt string to remind them.

I'd hate to see this go in without any sort of configurability, since
I would have to patch it out again for my own builds.

The way git-stash is currently documented teaches a stash/apply
workflow, in which pop is not used at all.  For example, in
git-stash.txt itself, the description of 'apply' has all the meat
while 'pop' just refers to 'apply'.  In user-manual.txt, there is an
example that teaches stash/apply.

This may historically be because 'git stash pop' was added later on:

  bd56ff5 (git-stash: add new 'pop' subcommand, 2008-02-22)
  f2c66ed (Add git-stash script, 2007-06-30)

But IMHO it would not be a good idea to teach people stash/pop anyway:
'stash drop' is irreversible, because the stash is itself implemented
through the reflog and thus not guarded by one.

And unfortunately, for people who use stash/apply instead of stash/pop
(including me :-), the proposed indicator merely shows if they have
ever used stash in the current repository.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

Attachment: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]