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

Re: [PATCH] git stash: one bug and one feature request

From
Brandon Casey <casey@nrlssc.navy.mil>
Date
Jan 4, 2008, 18:34 UTC
Message-ID
<477E7C3D.8030501@nrlssc.navy.mil>
In-Reply-To
<e5bfff550801041005x3ab682dam8535c7bde75038dc@mail.gmail.com>
Marco Costalba wrote:
Show 15 quoted lines
> On Jan 4, 2008 7:00 PM, Brandon Casey <casey@nrlssc.navy.mil> wrote:
>> Marco Costalba wrote:
>>> Ok, drop is better then clear, but, if we need to add a new command I
>>> vote for 'delete' or 'rm' to be consistent with git naming.
>> If the stash list is thought of as a stack, then drop makes sense.
>>
> 
> Yes, but is _not_ as a stack because you can say
> 
> git stash apply stash@{3}
> git stash apply stash@{1}
> git stash apply stash@{4}
> 
> i.e. you can access reflogs in any order, so thinking to a stack is
> misleading IMHO.

I think it is like a stack because new things are always added to the top and shift everything else down. i.e. we can't say 'git stash replace stash@{3}' and we probably wouldn't want to.

When we call git stash, the previous item on 'top' is pushed down so that it is the second item stash@{1}. The new item just stashed (pushed), is now on top at stash@{0}.

Doesn't seem like too far of a stretch.
-brandon
Previous: Marco CostalbaNext: Marco Costalba
Message 17 of 19 in “git stash: one bug and one feature request”
  1. git stash: one bug and one feature requestMarco Costalba, Jan 4, 2008
  2. Brandon CaseyJan 4, 2008
  3. Pascal ObryJan 4, 2008
  4. Jakub NarebskiJan 4, 2008
  5. Brian SwetlandJan 4, 2008
  6. Jeff KingJan 4, 2008
  7. Junio C HamanoJan 5, 2008
  8. Marco CostalbaJan 5, 2008
  9. Junio C HamanoJan 5, 2008
  10. Marco CostalbaJan 5, 2008
  11. Junio C HamanoJan 5, 2008
  12. Wayne DavisonJan 5, 2008
  13. Junio C HamanoJan 5, 2008
  14. Marco CostalbaJan 5, 2008
  15. Brandon CaseyJan 4, 2008
  16. Marco CostalbaJan 4, 2008
  17. Brandon CaseyJan 4, 2008
  18. Marco CostalbaJan 4, 2008
  19. Junio C HamanoJan 5, 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.