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

[BUG, RFC] git stash drop --help

From
VLVincent Legoll <vincent.legoll@gmail.com>
Date
May 20, 2015, 17:14 UTC
Message-ID
<CAEwRq=r=iMmnnzS2F_2rr9Tjem9khn1d=os3krjEjOg5iK5bww@mail.gmail.com>
Hello,
I stumbled upon something that annoyed me a bit, as I was working with
git stash to commit some big pile of modifications in small commits...
I wanted to get help wrt "git stash drop" and did it the following way :
[steps to reproduce]

mkdir tmp cd tmp git init touch test.txt git add test.txt git commit -a -m "initial version" echo zorglub > test.txt git stash git stash drop --help refs/stash@{0} supprimé (ff100a8c2f1b7b00b9100b32d2a5dc19a8b0092a)

And that was definitely not what I intended. Fortunately for me I had a backup of that stashed diff somewhere else, but I was still surprised,

because I was used to:
git $(SOMETHING) --help
to do what I want.

This is probably because "drop" is a subcommand of "stash", as evidenced by:

git stash --help drop

working as intended (even if as as side effect of --help ignoring further parameters)

-- 
Vincent Legoll
Next: Jeff King
Message 1 of 5 in “[BUG, RFC] git stash drop --help”
  1. Vincent LegollMay 20, 2015
  2. stash: complain about unknown flagsJeff King, May 20, 2015
  3. 2/1 stash: recognize "--help" for subcommandsJeff King, May 20, 2015
  4. Vincent LegollNov 1, 2015
  5. Vincent LegollNov 1, 2015

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.