Re: [PATCH v2] push: Provide situational hints for non-fast-forward errors
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 19, 2012, 22:41 UTC
- Message-ID
- <7vwr6g8b8b.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20120319222225.GA36860@gmail.com>
Christopher Tiwald <christiwald@gmail.com> writes:
Show 10 quoted lines
> How about the something like the following fixup? This introduces two > changes to v2: > > - It breaks the new advice into three config variables. Users > who might benefit from the advice can't accidentally shut a message > off before being confronted with the situation it's designed to > advise. > - It leaves pushNonFastForward in place, and if a user sets > 'advice.pushNonFastForward = false', it'll disable all three pieces > of advice.
Sounds good.
> static void advise_pull_before_push(void)
> {
> - if (!advice_push_non_ff_current)
> + if (!advice_push_non_ff_current | !advice_push_nonfastforward)Bitwise or would work OK as long as both sides are !var, but is not particularly a style. Please replace all of these with "||".
Other than that, sounds sane to me.
Thanks.