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

Re: [PATCH] bisect: remove check for fp and move the goto label after the fclose

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 16, 2022, 01:03 UTC
Message-ID
<xmqqy1r8nork.fsf@gitster.g>
In-Reply-To
<pull.1397.git.git.1671151402532.gitgitgadget@gmail.com>
"Rose via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 7 quoted lines
> From: Seija Kijin <doremylover123@gmail.com>
>
> The fp check in these function are only relevant if goto has been taken.
>
> Because of this, we should move the label so that fclose is not called.
>
> This is because the goto is taken when fp is 0 anyway.

It may happen to be so with today's code, but for the health of the code in the longer term, I do not think this patch is a good idea. We may add more "check error and jump to the label to clean it up" exit paths to these functions, and change to add such exit paths would essentially need to revert this change.

By the way, I do not know if this is something GGG end-users can fix, or requires a fix in GGG itself, but somebody keeps adding an e-mail address in the @users.noreply.github.com domain to the Cc: field of these patches. For folks whose work is GitHub only, it might be fine to declare "this user only has e-mail-address-looking string but does not receive e-mail at all", but as working with GGG is all about following e-mail based workflow, such an address should be added to patch e-mails sent to the list this say.

Thanks.
Previous: Rose via GitGitGadget
Message 2 of 2 in “bisect: remove check for fp and move the goto label after the fclose”
  1. bisect: remove check for fp and move the goto label after the fcloseRose via GitGitGadget, Dec 16, 2022
  2. Junio C HamanoDec 16, 2022

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.