git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Ian Kemp <ian.kemp@gmail.com>
To: git@vger.kernel.org
Subject: Feature request: different exit codes for git stash depending on whether stash was created or not
Date: Fri, 27 Sep 2019 13:55:27 +0100	[thread overview]
Message-ID: <CADZUK1cjvifbFYk9w6+vE95jgEBuwjoOi_1QfZHoPFBXuXHCCg@mail.gmail.com> (raw)

Hi,

Currently, git stash's exit code is 0 regardless of whether it
performed a stash operation or not. Third parties invoking git stash
are therefore unable to determine whether a stash was actually made or
not.

It would be helpful if there were different exit codes for the case
when a stash was created (working directory dirty) vs when a stash was
not (working dir clean). git stash create suffers from the same issue.

There are various workarounds for this e.g.
https://stackoverflow.com/a/34116244/70345 but they aren't
particularly pretty or reliable, hence this request.

Regards,
Ian

             reply	other threads:[~2019-09-27 12:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-27 12:55 Ian Kemp [this message]
2019-09-27 16:55 ` Feature request: different exit codes for git stash depending on whether stash was created or not Eric Sunshine
2019-09-27 23:07 ` brian m. carlson

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=CADZUK1cjvifbFYk9w6+vE95jgEBuwjoOi_1QfZHoPFBXuXHCCg@mail.gmail.com \
    --to=ian.kemp@gmail.com \
    --cc=git@vger.kernel.org \
    /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).