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

[PATCH] stash: suggest the correct command line for unknown options.

From
Matthieu Moy <matthieu.moy@imag.fr>
Date
Mar 5, 2010, 16:14 UTC
Message-ID
<1267805693-25206-1-git-send-email-Matthieu.Moy@imag.fr>
In-Reply-To
<4B910736.7060604@syntevo.com>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
Show 8 quoted lines
> > Does SmartGit call 'git stash save' behind the scenes with the
> > user-supplied message? Then it should run
> > 
> >   git stash save -- "$msg"
> > 
> > and you don't need to forbid anything.
> 
> Thank you very much, this solved the problem.

... unless one considers that the problem is that you had to ask. Something like this should avoid others the problem.

 git-stash.sh |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/git-stash.sh b/git-stash.sh
index 2d69196..cf4e673 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -151,6 +151,7 @@ save_stash () {
 			;;
 		-*)
 			echo "error: unknown option for 'stash save': $1"
+			echo "       To provide a message, use 'git stash -- $1'."
 			usage
 			;;
 		*)
-- 
1.7.0.231.g9fa6.dirty
Previous: Thomas SingerNext: Jeff King
Message 4 of 7 in “git stash save <message>”
  1. Thomas SingerMar 5, 2010
  2. Johannes SixtMar 5, 2010
  3. Thomas SingerMar 5, 2010
  4. stash: suggest the correct command line for unknown options.Matthieu Moy, Mar 5, 2010
  5. Jeff KingMar 5, 2010
  6. stash: suggest the correct command line for unknown options.Matthieu Moy, Mar 5, 2010
  7. Junio C HamanoMar 7, 2010

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.