From: Matthieu Moy <Matthieu.Moy@grenoble-inp•fr>
To: Thomas Gummerer <t.gummerer@gmail•com>
Cc: "Joel Teichroeb" <joel@teichroeb•net>,
"Git Mailing List" <git@vger•kernel.org>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail•com>,
"Johannes Schindelin" <Johannes.Schindelin@gmx•de>,
"Jeff King" <peff@peff•net>,
"Christian Couder" <christian.couder@gmail•com>
Subject: Re: [PATCH v4 5/5] stash: implement builtin stash
Date: Mon, 26 Jun 2017 09:53:33 +0200 [thread overview]
Message-ID: <vpqshini3r6.fsf@anie.imag.fr> (raw)
In-Reply-To: <20170625210909.GB7737@hank> (Thomas Gummerer's message of "Sun, 25 Jun 2017 22:09:09 +0100")
Thomas Gummerer <t.gummerer@gmail•com> writes:
> After the line
>
> test -n "$seen_non_option" || set "push" "$@"
>
> it's not possible that $# is 0 anymore, so this will never be
> printed. From a quick look at the history it seems like it wasn't
> possible to trigger that codepath for a while. If I'm reading things
> correctly 3c2eb80fe3 ("stash: simplify defaulting to "save" and reject
> unknown options", 2009-08-18) seems to have introduced the small
> change in behaviour.
Indeed. That wasn't on purpose, but I seem to have turned this
case $# in
0)
push_stash &&
say "$(gettext "(To restore them type \"git stash apply\")")"
;;
into dead code.
> As I don't think anyone has complained since then, I'd just leave it
> as is, which makes git stash with no options a little less verbose.
I agree it's OK to keep is as-is, but the original logic (give a bit
more advice when "stash push" was DWIM-ed) made sense too, so it can
make sense to re-activate it while porting to C.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
next prev parent reply other threads:[~2017-06-26 8:02 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-08 0:55 [PATCH v4 0/5] Implement git stash as a builtin command Joel Teichroeb
2017-06-08 0:55 ` [PATCH v4 1/5] stash: add test for stash create with no files Joel Teichroeb
2017-06-13 19:31 ` Junio C Hamano
2017-06-08 0:55 ` [PATCH v4 2/5] stash: Add a test for when apply fails during stash branch Joel Teichroeb
2017-06-13 19:40 ` Junio C Hamano
2017-06-13 19:54 ` Joel Teichroeb
2017-06-08 0:55 ` [PATCH v4 3/5] stash: add test for stashing in a detached state Joel Teichroeb
2017-06-13 19:45 ` Junio C Hamano
2017-06-13 19:48 ` Joel Teichroeb
2017-06-13 20:58 ` Junio C Hamano
2017-06-08 0:55 ` [PATCH v4 4/5] merge: close the index lock when not writing the new index Joel Teichroeb
2017-06-13 19:47 ` Junio C Hamano
2017-06-08 0:55 ` [PATCH v4 5/5] stash: implement builtin stash Joel Teichroeb
2017-06-11 21:27 ` Thomas Gummerer
2017-06-20 2:37 ` Joel Teichroeb
2017-06-25 21:09 ` Thomas Gummerer
2017-06-26 7:53 ` Matthieu Moy [this message]
2017-06-27 14:53 ` Thomas Gummerer
2017-06-16 16:15 ` Junio C Hamano
2017-06-16 22:47 ` Junio C Hamano
2017-06-19 13:16 ` Johannes Schindelin
2017-06-19 13:20 ` Jeff King
2017-06-20 2:12 ` Joel Teichroeb
2017-06-22 17:23 ` Junio C Hamano
2017-06-22 17:07 ` Junio C Hamano
2017-06-11 17:40 ` [PATCH v4 0/5] Implement git stash as a builtin command Joel Teichroeb
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=vpqshini3r6.fsf@anie.imag.fr \
--to=matthieu.moy@grenoble-inp$(echo .)fr \
--cc=Johannes.Schindelin@gmx$(echo .)de \
--cc=avarab@gmail$(echo .)com \
--cc=christian.couder@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=joel@teichroeb$(echo .)net \
--cc=peff@peff$(echo .)net \
--cc=t.gummerer@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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