From: Andreas Politz <politza@hochschule-trier.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: git checkout exit value and post-commit hooks
Date: Tue, 14 Mar 2017 11:07:53 +0100 [thread overview]
Message-ID: <87tw6w9nnq.fsf@luca> (raw)
In-Reply-To: <xmqqshmgjt2j.fsf@gitster.mtv.corp.google.com> (Junio C. Hamano's message of "Mon, 13 Mar 2017 23:00:52 -0700")
Junio C Hamano <gitster@pobox.com> writes:
> Andreas Politz <politza@hochschule-trier.de> writes:
>
>> the exit value of a `git checkout' seems to depend on the exit values of
>> the hooks it runs. This breaks for example `git bisect', as seen in the
>> following example.
>
> I am a bit puzzled why you have "checkout" and "post-commit" on the
> title, though. Does checkout call a hook for "commit"?
No, just a typo.
> Any script that calls "git checkout" and sees it fail should not
> blindly continue its usual processing; if "git bisect" notices an
> error from "git checkout" it internally runs and stops, it is doing
> the right thing.
So its by designed, I should have guessed as much.
I'm sorry, I never used git-hooks before and spend an hour trying to
figure out, why I can't reset the bisect operation, while the error
message (something to the effect of "Unable to checkout master" seemed
ridiculous.
-ap
prev parent reply other threads:[~2017-03-14 10:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-14 1:58 git checkout exit value and post-commit hooks Andreas Politz
2017-03-14 6:00 ` Junio C Hamano
2017-03-14 10:07 ` Andreas Politz [this message]
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=87tw6w9nnq.fsf@luca \
--to=politza@hochschule-trier.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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;
as well as URLs for NNTP newsgroup(s).