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

Re: git-stash: RFC: Adopt the default behavior to other commands

From
Andreas Ericsson <ae@op5.se>
Date
Dec 18, 2007, 15:28 UTC
Message-ID
<4767E717.2060902@op5.se>
In-Reply-To
<Pine.LNX.4.64.0712181513060.23902@racer.site>
Johannes Schindelin wrote:
Show 24 quoted lines
> Hi,
> 
> On Tue, 18 Dec 2007, Andreas Ericsson wrote:
> 
>> Johannes Schindelin wrote:
>>
>>> In the alternative, you could just scrap all those default actions, 
>>> showing synopses instead.  For all commands, including "git commit", 
>>> "git log", "git fetch", etc.
>> Like we do for the git wrapper, you mean? Yes, that would be one 
>> solution, although not a very good one for all commands.
> 
> Exactly.  Not a good one.
> 
>> It's probably not a bad idea for commands where the primary use is 
>> something else than producing visual output though, such as tag or 
>> branch, but those handle creation/deletion of stuff, so the default 
>> action for them is to list stuff of the kind they operate on. I fail to 
>> see why stash should be any different.
> 
> I also fail to see why stash should be any different.  And that's why I 
> expect it to have a default operation, which is -- you guessed it -- 
> "stash the changes!"
> 
Actually, I guessed "list the stashes".
Show 9 quoted lines
> If I am not sure what I am about to do, there is -- wonder of wonders -- 
> the "-h" option!  And indeed:
> 
> 	$ git stash -h
> 	Usage: /home/gitte/bin/git-stash [  | save | list | show | apply | 
> 		clear | create ]
> 
> So what exactly was your point again?
> 

My point is that it would be nice if all git commands that actually manipulate objects (create/delete/modify) had a safe default, and that experienced users such as yourself could endure the insufferable agony of retraining your fingers to type five more chars so that people won't have to get bitten by surprises.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Previous: Johannes SchindelinNext: Jakub Narebski
Message 12 of 33 in “git-stash: RFC: Adopt the default behavior to other commands”
  1. Sebastian HarlDec 17, 2007
  2. Benoit SigoureDec 17, 2007
  3. Junio C HamanoDec 17, 2007
  4. Benoit SigoureDec 17, 2007
  5. Junio C HamanoDec 18, 2007
  6. Sebastian HarlDec 18, 2007
  7. Johannes SchindelinDec 18, 2007
  8. Andreas EricssonDec 18, 2007
  9. Johannes SchindelinDec 18, 2007
  10. Andreas EricssonDec 18, 2007
  11. Johannes SchindelinDec 18, 2007
  12. Andreas EricssonDec 18, 2007
  13. Jakub NarebskiDec 18, 2007
  14. Andreas EricssonDec 18, 2007
  15. Johannes SchindelinDec 18, 2007
  16. Sergei OrganovDec 18, 2007
  17. Johannes SchindelinDec 18, 2007
  18. Martin LanghoffDec 18, 2007
  19. Wincent ColaiutaDec 18, 2007
  20. Jörg SommerDec 18, 2007
  21. Johannes SchindelinDec 18, 2007
  22. Junio C HamanoDec 18, 2007
  23. しらいしななこDec 20, 2007
  24. Junio C HamanoDec 20, 2007
  25. Wincent ColaiutaDec 21, 2007
  26. しらいしななこDec 21, 2007
  27. André Goddard RosaDec 18, 2007
  28. Martin LanghoffDec 18, 2007
  29. Wincent ColaiutaDec 19, 2007
  30. Martin LanghoffDec 19, 2007
  31. Andreas EricssonDec 19, 2007
  32. Johannes SchindelinDec 19, 2007
  33. Wincent ColaiutaDec 19, 2007

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.