From: Junio C Hamano Date: Mon, 19 Mar 2012 22:41:40 GMT Subject: Re: [PATCH v2] push: Provide situational hints for non-fast-forward errors Message-ID: <7vwr6g8b8b.fsf@alter.siamese.dyndns.org> In-Reply-To: <20120319222225.GA36860@gmail.com> Christopher Tiwald writes: > 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.