git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: Gunnlaugur Thor Briem <gunnlaugur@gmail.com>, git@vger.kernel.org
Subject: Re: Better handling of erroneous git stash save "somemessage" --keep-index
Date: Tue, 26 Feb 2013 09:00:46 -0800	[thread overview]
Message-ID: <7vsj4jm2m9.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <vpq1uc3cagy.fsf@grenoble-inp.fr> (Matthieu Moy's message of "Tue, 26 Feb 2013 17:21:17 +0100")

Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:

> I didn't even know that multi-words messages would be allowed this way.
> That seems to me to be really weird indeed.

Yeah, but it is understandable why it was done that way, considering
taht the whole point of "stash" is to save away quickly for higher
priority interrupt. IIRC, earlier iterations of the command did not
even require you to say "save", i.e.

	git stash wip: futzing with --keep-index

would have been a perfectly good invocation.

> My feeling is that "git stash save" should learn a "-m, --message"
> option analogous to the one of "git commit", and then the "message on
> the command-line" syntax could be deprecated.
>
> (One nice side effect would be that in the very long term, we may want
> to allow "git stash save -- <pathspecs>" to do a limited stash)
>
> But maybe it's not worth the effort, I don't know.

Yeah, if the user wants to be more elaborate perhaps

	git checkout -b temp
        git commit -m 'whatever message' -a
	git checkout -

would suffice; "stash" is for smaller changes in a very tentative
nature that do not deserve such a long command sequence, so
requiring "-m" may make the command less useful.

  reply	other threads:[~2013-02-26 17:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-26 15:59 Better handling of erroneous git stash save "somemessage" --keep-index Gunnlaugur Thor Briem
2013-02-26 16:10 ` Junio C Hamano
2013-02-26 16:21   ` Matthieu Moy
2013-02-26 17:00     ` Junio C Hamano [this message]
2013-02-26 16:46   ` Gunnlaugur Thor Briem

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=7vsj4jm2m9.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    --cc=gunnlaugur@gmail.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).