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

Re: [PATCH v2] hooks: add sendemail-validate-series

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Apr 11, 2023, 09:58 UTC
Message-ID
<9b8d6cc4-741a-5081-d5de-df0972efec37@gmail.com>
In-Reply-To
<230406.868rf5tkzs.gmgdl@evledraar.gmail.com>
On 06/04/2023 09:56, Ævar Arnfjörð Bjarmason wrote:
Show 6 quoted lines
> 
> On Thu, Apr 06 2023, Robin Jarry wrote:
> 
> Honestly, I don't really get the use-case. If your 02/N depends on 01/N
> couldn't your hook just maintain its own state, e.g. in some file
> created in the passed $GIT_DIR?

A hook that wants to check some property of the whole series needs to know which patch is the final one. We could pass that via the environment as we do for external diff commands with GIT_DIFF_PATH_COUNTER and GIT_DIFF_PATH_TOTAL.

> With the upcoming parallel hooks, I'm also skeptical of a an interface
> that would preclude validating these in parallel.

I'd not thought of that, I thought the idea of parallel hooks was to run different scripts for the same hook in parallel, not have multiple instances of the same script running simultaneously.

Show 5 quoted lines
> I also don't understand the reason for the stdin interface. The
> "git-send-email" program itself takes a <file|directory>, so concerns
> about the files exceeding argument list seem out the window, i.e. we
> could just pass the dir/files, and as we'd have the same limitations
> here we should be able to pass the full set of files, no?

No, not if the user passes something like "HEAD~1000.." instead of a list of paths.

Best Wishes
Phillip
> I.e. why not a sendemail-validate-all that just takes a dir or file(s)?
Previous: Ævar Arnfjörð BjarmasonNext: Robin Jarry
Message 16 of 18 in “hooks: add sendemail-validate-series”
  1. hooks: add sendemail-validate-seriesRobin Jarry, Apr 2, 2023
  2. Eric SunshineApr 3, 2023
  3. Phillip WoodApr 3, 2023
  4. Robin JarryApr 3, 2023
  5. Phillip WoodApr 3, 2023
  6. Junio C HamanoApr 3, 2023
  7. Robin JarryApr 3, 2023
  8. Robin JarryApr 3, 2023
  9. Junio C HamanoApr 3, 2023
  10. Robin JarryApr 3, 2023
  11. Junio C HamanoApr 4, 2023
  12. Robin JarryApr 5, 2023
  13. Junio C HamanoApr 5, 2023
  14. hooks: add sendemail-validate-seriesRobin Jarry, Apr 5, 2023
  15. Ævar Arnfjörð BjarmasonApr 6, 2023
  16. Phillip WoodApr 11, 2023
  17. Robin JarryApr 11, 2023
  18. Junio C HamanoApr 11, 2023

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.