git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Vromen\, Tomer" <tomer.vromen@intel.com>
Cc: "git\@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Bug report: git-stash doesn't return correct status code
Date: Wed, 07 Mar 2018 10:58:50 -0800	[thread overview]
Message-ID: <xmqqzi3jzp91.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <8ED425DE0F8BEC45AADD477A8872875788FB691C@hasmsx109.ger.corp.intel.com> (Tomer Vromen's message of "Wed, 7 Mar 2018 12:16:48 +0000")

"Vromen, Tomer" <tomer.vromen@intel.com> writes:

>> git stash && git checkout -b new-feature-branch && git stash pop
>
> This is useful when I realize that I want to open a new branch for my changes (that I haven't committed yet).
> However, I might have forgotten to save my changes in the editor, so git-stash will give this error:
>
> No local changes to save

This is given with "say" and not with "die", as this is merely an
informational diagnosis.  The command did not find any erroneous
condition, the command did not fail to do anything it was supposed
to do, so the command exited with 0 status.


  reply	other threads:[~2018-03-07 18:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-07 12:16 Bug report: git-stash doesn't return correct status code Vromen, Tomer
2018-03-07 18:58 ` Junio C Hamano [this message]
2018-03-07 21:02   ` Junio C Hamano
2018-03-08 14:22     ` Vromen, Tomer

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=xmqqzi3jzp91.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=tomer.vromen@intel.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).