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

RE: [PATCH] builtins + test helpers: use return instead of exit() in cmd_*

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Jun 7, 2021, 17:02 UTC
Message-ID
<60be5113c50a1_39c0a208e1@natae.notmuch>
In-Reply-To
<patch-1.1-61d7e6e079-20210607T111008Z-avarab@gmail.com>
Ævar Arnfjörð Bjarmason wrote:
Show 7 quoted lines
> Change various cmd_* functions to use "return" instead of exit() to
> indicate an exit code. On Solaris with SunCC the compiler legitimately
> complains about these, since we'll e.g. skip the cleanup (e.g. closing
> fd's, erroring if we can't) in git.c's run_builtin() when we exit()
> directly like this.
> 
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Makes sense to me and it's obviously correct.
Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com>
-- 
Felipe Contreras
Previous: Ævar Arnfjörð BjarmasonNext: Jeff King
Message 2 of 10 in “builtins + test helpers: use return instead of exit() in cmd_*”
  1. builtins + test helpers: use return instead of exit() in cmd_*Ævar Arnfjörð Bjarmason, Jun 7, 2021
  2. Felipe ContrerasJun 7, 2021
  3. Jeff KingJun 8, 2021
  4. Ævar Arnfjörð BjarmasonJun 8, 2021
  5. Phillip WoodJun 10, 2021
  6. Ævar Arnfjörð BjarmasonJun 10, 2021
  7. builtins + test helpers: use return instead of exit() in cmd_*Ævar Arnfjörð Bjarmason, Jun 8, 2021
  8. Junio C HamanoJun 8, 2021
  9. Ævar Arnfjörð BjarmasonJun 9, 2021
  10. Junio C HamanoJun 9, 2021

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.