From: Junio C Hamano <gitster@pobox.com>
To: "Marco Costalba" <mcostalba@gmail.com>
Cc: "Junio C Hamano" <gitster@pobox.com>,
"Git Mailing List" <git@vger.kernel.org>
Subject: Re: [PATCH] git stash: one bug and one feature request
Date: Sat, 05 Jan 2008 01:06:23 -0800 [thread overview]
Message-ID: <7v7iiod4kw.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <e5bfff550801050025g6758bfb6p751e69e93d4299be@mail.gmail.com> (Marco Costalba's message of "Sat, 5 Jan 2008 09:25:59 +0100")
"Marco Costalba" <mcostalba@gmail.com> writes:
> I understand your point. The problem is that in git there isn't an
> unique way to test success/fail for any command, as example, regarding
> checking the exit status:
>
> $ git status; echo $?
> # On branch master
> nothing to commit (working directory clean)
> 1
That is a bad example, with a slight historical background.
When you say "git status $args", you are asking the command this
question.
I am contemplating to issue "git commit $args", but will
there actually be changes if I issued that command?
When there will be no changes staged with the given $args (in
your case that happens to be empty), there won't be anything to
be committed if you issued "git commit $args" at that point.
The command answers "Eh, by issuing 'git commit' you will get
an 'Nothing to commit', which is an error" --- and that is
reported with its exit status.
next prev parent reply other threads:[~2008-01-05 9:07 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-04 16:14 [PATCH] git stash: one bug and one feature request Marco Costalba
2008-01-04 16:36 ` Brandon Casey
2008-01-04 17:30 ` Pascal Obry
2008-01-04 17:51 ` Jakub Narebski
2008-01-04 19:36 ` Brian Swetland
2008-01-04 21:04 ` Jeff King
[not found] ` <e5bfff550801040944p7f8e722asfa726b34a4a712fa@mail.gmail.com>
2008-01-04 18:00 ` Brandon Casey
2008-01-04 18:05 ` Marco Costalba
2008-01-04 18:34 ` Brandon Casey
2008-01-04 18:46 ` Marco Costalba
2008-01-05 0:31 ` Junio C Hamano
2008-01-05 0:29 ` Junio C Hamano
2008-01-05 8:25 ` Marco Costalba
2008-01-05 8:36 ` Junio C Hamano
2008-01-05 8:57 ` Marco Costalba
2008-01-05 9:06 ` Junio C Hamano [this message]
2008-01-05 6:41 ` Wayne Davison
2008-01-05 6:52 ` Junio C Hamano
2008-01-05 8:31 ` Marco Costalba
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=7v7iiod4kw.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=mcostalba@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.