Re: git checkout exit value and post-commit hooks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> Andreas Politz <politza@xxxxxxxxxxxxxxxxxxx> 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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]