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

Re: [PATCH v2 0/4] difftool refactoring + remove OPT_ARGUMENT() macro

From
Jeff King <peff@peff.net>
Date
Sep 13, 2021, 18:04 UTC
Message-ID
<YT+Sv6gdNTMuP5NC@coredump.intra.peff.net>
In-Reply-To
<cover-v2-0.4-00000000000-20210913T033204Z-avarab@gmail.com>
On Mon, Sep 13, 2021 at 05:35:36AM +0200, Ævar Arnfjörð Bjarmason wrote:
Show 10 quoted lines
> I think this v2 should address the comments Jeff King had in
> https://lore.kernel.org/git/YT6BnnXeAWn8BycF@coredump.intra.peff.net/;
> there's now an amended version of his proposed patch as part of this,
> but I prepended it with another one to prepare the "struct
> child_process" in cmd_difftool().
> 
> Doing so nicely gets around the question of the strvec memory
> management, since we can trust the run-command.c API to do that for
> us, but couldn't in my v1 when we'd copy our own "struct strvec *" to
> its "args".

Thanks for taking my suggestions into account. I like this approach, and I don't see any bugs. I replied separately to patch 3 with some further opportunities for cleanup, but with or without them, this is all a strict improvement.

-Peff
Previous: Junio C Hamano
Message 17 of 17 in “parse-options.c: remove OPT_ARGUMENT”
  1. 0/2 parse-options.c: remove OPT_ARGUMENTÆvar Arnfjörð Bjarmason, Sep 11, 2021
  2. 1/2 difftool: use "struct strvec" API in run_{dir,file}_diff()Ævar Arnfjörð Bjarmason, Sep 11, 2021
  3. Jeff KingSep 12, 2021
  4. Jeff KingSep 12, 2021
  5. Junio C HamanoSep 13, 2021
  6. 2/2 parse-options API: remove OPTION_ARGUMENT featureÆvar Arnfjörð Bjarmason, Sep 11, 2021
  7. Jeff KingSep 12, 2021
  8. 0/4 difftool refactoring + remove OPT_ARGUMENT() macroÆvar Arnfjörð Bjarmason, Sep 13, 2021
  9. 2/4 difftool: prepare "diff" cmdline in cmd_difftool()Ævar Arnfjörð Bjarmason, Sep 13, 2021
  10. 1/4 difftool: prepare "struct child_process" in cmd_difftool()Ævar Arnfjörð Bjarmason, Sep 13, 2021
  11. 3/4 difftool: use run_command() API in run_file_diff()Ævar Arnfjörð Bjarmason, Sep 13, 2021
  12. Jeff KingSep 13, 2021
  13. Ævar Arnfjörð BjarmasonSep 13, 2021
  14. Jeff KingSep 13, 2021
  15. 4/4 parse-options API: remove OPTION_ARGUMENT featureÆvar Arnfjörð Bjarmason, Sep 13, 2021
  16. Junio C HamanoSep 13, 2021
  17. Jeff KingSep 13, 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.