Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Σταύρος Ντέντος" <stdedos@gmail.com>
Cc: git <git@vger.kernel.org>
Subject: Re: git stash push/save/create all return exit code 0, even if no object was created
Date: Sun, 22 Mar 2020 08:50:23 -0700	[thread overview]
Message-ID: <xmqq8sjs8k3k.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <CAHMHMxW=muHe5qqndtdzR_md6KFQqwEonko-2gXC_q973JgB5w@mail.gmail.com> ("Σταύρος Ντέντος"'s message of "Sun, 22 Mar 2020 17:09:57 +0200")

This has been asked and answered recently at least twice, I think.

https://lore.kernel.org/git/01020169a7ad6af3-ad50e2d1-19fb-46eb-b397-759f8d579e8b-000000@eu-west-1.amazonses.com/

https://lore.kernel.org/git/CADZUK1cjvifbFYk9w6+vE95jgEBuwjoOi_1QfZHoPFBXuXHCCg@mail.gmail.com/

I think these previous ones wanted something more relevant to "git
stash", in the sense that they wanted to be able to

	git stash
	do some other things
	do many other things
	if earlier "git stash" produced an entry
		git stash pop

and the answer to that may be "use stash create upfront, save it
away yourself in a variable or something, then use that to restore"

But to me your use case does not look like it has much to "git
stash".  If a user wants to ask "is my working tree and the index
dirty (iow, have I made any changes)?", wouldn't "git status" be the
right tool for the job?  It even has an option to produce output
designed to be machine readable.

  reply	other threads:[~2020-03-22 15:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-22 15:09 git stash push/save/create all return exit code 0, even if no object was created Σταύρος Ντέντος
2020-03-22 15:50 ` Junio C Hamano [this message]
2020-03-22 16:15   ` Σταύρος Ντέντος

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=xmqq8sjs8k3k.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=stdedos@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