git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] Make stashing nothing exit 1
@ 2019-03-22 23:12 Keith Smiley
  2019-03-23  7:54 ` Ævar Arnfjörð Bjarmason
  2019-03-24 12:42 ` Junio C Hamano
  0 siblings, 2 replies; 10+ messages in thread
From: Keith Smiley @ 2019-03-22 23:12 UTC (permalink / raw)
  To: git

In the case there are no files to stash, but the user asked to stash, we
should exit 1 since the stashing failed.
---
 git-stash.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git-stash.sh b/git-stash.sh
index 789ce2f41d4a3..ca362b1a31277 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -318,7 +318,7 @@ push_stash () {
 	if no_changes "$@"
 	then
 		say "$(gettext "No local changes to save")"
-		exit 0
+		exit 1
 	fi
 
 	git reflog exists $ref_stash ||

--
https://github.com/git/git/pull/587

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-04-12 13:08 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-22 23:12 [PATCH] Make stashing nothing exit 1 Keith Smiley
2019-03-23  7:54 ` Ævar Arnfjörð Bjarmason
2019-03-24  3:37   ` Eric Sunshine
2019-03-25 15:29     ` Johannes Schindelin
2020-04-12 13:08   ` Maxim Mazurok
2019-03-24 12:42 ` Junio C Hamano
2019-05-22 23:57   ` Maksim Odnoletkov
2019-05-23  0:23     ` Ævar Arnfjörð Bjarmason
2019-05-23  6:14     ` Johannes Sixt
2019-05-23  9:49       ` Maksim Odnoletkov

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).