git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Kevin Leung" <kevinlsk@gmail.com>
Cc: "Git ML" <git@vger.kernel.org>,
	"Junio C Hamano" <gitster@pobox.com>,
	"Nanako Shiraishi" <nanako3@bluebottle.com>
Subject: Re: [PATCH] git-stash: Display help message if git-stash is run with wrong sub-commands
Date: Sun, 02 Dec 2007 18:48:00 -0800	[thread overview]
Message-ID: <7vwsrwqysf.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <e66701d40712021834h64bf8d0y14f0e222d0f9a617@mail.gmail.com> (Kevin Leung's message of "Mon, 3 Dec 2007 10:34:05 +0800")

"Kevin Leung" <kevinlsk@gmail.com> writes:

> The current git-stash behaviour is very error prone to typos. For example,
> if you typed "git-stash llist", git-stash would think that you wanted to
> save to a stash named "llist", but in fact, you meant "git-stash list".
>
> Signed-off-by: Kevin Leung <kevinlsk@gmail.com>

Thanks.  Looks good.  except...

> @@ -195,6 +195,10 @@ show)
>         shift
>         show_stash "$@"
>         ;;
> +save)
> +       shift
> +       save_stash "$@" && git-reset --hard
> +       ;;

... this should be "$*" as it was originally spelled.

Save this script in foo.sh and run "foo.sh a b c" to see what I mean.

#!/bin/sh

foo () {
	msg="$1"
	echo "Foo here <$1>"
}

foo "$@"
foo "$*"

  reply	other threads:[~2007-12-03  2:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-03  2:34 [PATCH] git-stash: Display help message if git-stash is run with wrong sub-commands Kevin Leung
2007-12-03  2:48 ` Junio C Hamano [this message]
2007-12-03  3:36   ` Kevin Leung
2007-12-03  6:16 ` Wayne Davison
2007-12-03 10:25   ` Johannes Schindelin
2007-12-04 15:28     ` Wayne Davison

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vwsrwqysf.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=kevinlsk@gmail.com \
    --cc=nanako3@bluebottle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).