git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Show presense of stashed changes in bash prompt.

From
Shawn O. Pearce <spearce@spearce.org>
Date
Jun 2, 2009, 15:29 UTC
Message-ID
<20090602152915.GK30527@spearce.org>
In-Reply-To
<7vzlcqfyli.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> wrote:
Show 9 quoted lines
> Daniel Trstenjak <Daniel.Trstenjak@online.de> writes:
> > Avoid the forgetting of stashed changes by showing
> > them in the bash prompt.
> >
> > If the presense is shown is configurable by setting
> > GIT_PS1_SHOW_STASH_STATE to a nonempty value.
> 
> Why am I getting this deja-vu feeling about this patch, I wonder...  Is
> this a re-roll of a previously posted patch?
I don't know... I had a similar deja-vu feeling when I read it.
 
> Shawn?
Initial NAK, see below for the nit.
 
Show 12 quoted lines
> > diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> > index 98b9cbe..ed0c463 100755
> > --- a/contrib/completion/git-completion.bash
> > +++ b/contrib/completion/git-completion.bash
> > @@ -40,6 +40,10 @@
> >  #       with the bash.showDirtyState variable, which defaults to true
> >  #       once GIT_PS1_SHOWDIRTYSTATE is enabled.
> >  #
> > +#       You can also see if currently something is stashed, by setting
> > +#       GIT_PS1_SHOW_STASH_STATE to a nonempty value. If something is stashed,
> > +#       then a '$' will be shown next to the branch name. 
> > +#

Can we call this GIT_PS1_SHOWSTASHSTATE to match the already present GIT_PS1_SHOWDIRTYSTATE in at least style formatting?

The bike shed already sailed... GIT_PS1_SHOWDIRTYSTATE shipped in 1.6.3. Lets keep the same style.

Otherwise it looks fine to me, when you resend you can add my
Acked-by: Shawn O. Pearce <spearce@spearce.org>
-- 
Shawn.
Previous: Daniel TrstenjakNext: Daniel Trstenjak
Message 2 of 5 in “Show presense of stashed changes in bash prompt.”
  1. Show presense of stashed changes in bash prompt.Daniel Trstenjak, Jun 2, 2009
  2. Shawn O. PearceJun 2, 2009
  3. Daniel TrstenjakJun 2, 2009
  4. Jakub NarebskiJun 2, 2009
  5. Daniel TrstenjakJun 2, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.