git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Christopher Tiwald
Message 4 of 4 in “push: Provide situational hints for non-fast-forward errors”
  1. push: Provide situational hints for non-fast-forward errorsChristopher Tiwald, Mar 19, 2012
  2. Junio C HamanoMar 19, 2012
  3. Christopher TiwaldMar 19, 2012
  4. Junio C HamanoMar 19, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.