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

Re: [PATCH] Showing stash state in bash prompt

From
Miles Bader <miles@gnu.org>
Date
May 15, 2009, 00:57 UTC
Message-ID
<buo1vqrqj2n.fsf@dhlpc061.dev.necel.com>
In-Reply-To
<200905142025.02592.trast@student.ethz.ch>
Thomas Rast <trast@student.ethz.ch> writes:
> 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.

I don't understand why you say this -- sure "drop" is dangerous, but that's exactly why you should use "pop" instead, because it makes sure the changes are _somewhere_. I found with the old (pre-"pop") stash, I'd often end up in a situation where I'd lose track of whether I had done a stash apply or not, and the risk of inadvertently doing a drop _without_ a corresponding apply was very real.

stash/pop is safer, more convenient, and I think it better matches how people actually work.

-Miles
-- 
What the fuck do white people have to be blue about!?  Banana Republic ran
out of Khakis?  The Espresso Machine is jammed?  Hootie and The Blowfish
are breaking up??!  Shit, white people oughtta understand, their job is to
GIVE people the blues, not to get them!  -- George Carlin
Previous: Thomas RastNext: Jeff King
Message 6 of 13 in “Showing stash state in bash prompt”
  1. Showing stash state in bash promptDaniel Trstenjak, May 13, 2009
  2. Sverre RabbelierMay 13, 2009
  3. Daniel TrstenjakMay 13, 2009
  4. Junio C HamanoMay 13, 2009
  5. Thomas RastMay 14, 2009
  6. Miles BaderMay 15, 2009
  7. Jeff KingMay 15, 2009
  8. John TapsellMay 15, 2009
  9. Brian GernhardtMay 15, 2009
  10. Miles BaderMay 15, 2009
  11. Documentation: teach stash/pop workflow instead of stash/applyThomas Rast, May 28, 2009
  12. Sitaram ChamartyMay 29, 2009
  13. Junio C HamanoMay 29, 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.