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

Re: [PATCH] git-stash: alias 'list' to 'ls' and 'clear' to 'rm'

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 5, 2008, 14:03 UTC
Message-ID
<alpine.LSU.1.00.0802051401000.8543@racer.site>
In-Reply-To
<773F09A7-0871-4950-BDE4-D54E822C8203@wincent.com>
Hi,
On Tue, 5 Feb 2008, Wincent Colaiuta wrote:
Show 34 quoted lines
> El 5/2/2008, a las 12:20, Tim Stoakes escribió:
> 
> > Wincent Colaiuta(win@wincent.com)@050208-12:06:
> > > El 5/2/2008, a las 11:38, Tim Stoakes escribi?:
> > > 
> > > > clear::
> > > > +rm::
> > > > 	Remove all the stashed states. Note that those states will 
> > > >         then be subject to pruning, and may be difficult or 
> > > >         impossible to recover.
> > > 
> > > Isn't "rm" a bit misleading here? Seeing as the clear subcommand 
> > > really does an "rm -rf".
> > 
> > $ git stash clear foo
> > git stash clear with parameters is unimplemented
> > 
> > It appears that 'clear' is intended to behave like 'rm', however, it 
> > isn't implemented yet.
> 
> No, I don't think it was ever _intended_ to behave like rm. It does 
> pretty much what the man page says, clears all stashed states and that 
> was always its intention.
> 
> But lots of people have said that they'd like to be able to pop only to 
> topmost stash off the stack, or delete a specific stash, and some have 
> reported being caught by surprise and clearing all stashes when they 
> only wanted to delete one of them. There were patch(es) to the mailing 
> list a while back teaching "git reflog" to delete specific entries, and 
> seeing as "git stash" is built on top of reflogs the idea was that if 
> someone wants to implement a subcommand for deleting specific stashes 
> (or a push/pop kind of thing) then the reflog stuff would enable that. I 
> think the refog patch(es) was/were from Dscho. I can't remember who/if 
> has followed up with push/pop/delete patches for "git stash".
The followup was by Brandon (Cc'ed) to add "stash drop":
http://article.gmane.org/gmane.comp.version-control.git/69627/match=stash+drop

However, I did not like that "drop" should be introduced before "pop" (=apply&&drop).

Ciao, Dscho

Previous: Wincent ColaiutaNext: Brandon Casey
Message 5 of 9 in “git-stash: alias 'list' to 'ls' and 'clear' to 'rm'”
  1. git-stash: alias 'list' to 'ls' and 'clear' to 'rm'Tim Stoakes, Feb 5, 2008
  2. Wincent ColaiutaFeb 5, 2008
  3. Tim StoakesFeb 5, 2008
  4. Wincent ColaiutaFeb 5, 2008
  5. Johannes SchindelinFeb 5, 2008
  6. git-stash: add new 'drop' subcommandBrandon Casey, Feb 6, 2008
  7. Paolo BonziniFeb 6, 2008
  8. Junio C HamanoFeb 6, 2008
  9. Johannes SchindelinFeb 6, 2008

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.