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

Re: [PATCH] post-receive-email hook: handle order of arguments consistently

From
APAndy Parkins <andyparkins@gmail.com>
Date
Aug 7, 2007, 17:38 UTC
Message-ID
<200708071838.17999.andyparkins@gmail.com>
In-Reply-To
<20070807135849.24926.qmail@49810ee852ce6e.315fe32.mid.smarden.org>
On Tuesday 2007, August 07, Gerrit Pape wrote:
> The post-receive-email hook usually gets its arguments through stdin,
> but also supports them to be specified at the command line.  The order
> of the arguments should consistently follow the documentation no matter
> how they are passed to the script.

As I said the last time this was posted, this was done on purpose so that the command line arguments match the order of the arguments to the update hook.

Keeping them in that order allows the script to be used as an update hook in older versions of git.

Whether that is sensible or not is for Junio and the gang to decide; but there was good reason for doing it that way. Also, I'm not sure what documentation you're talking about - use in command line mode is a bonus feature anyway, it's not necessary in normal hook mode anyway. If you're going to be strict about matching documentation then the command line mode should be removed.

Andy
-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com
Previous: Gerrit Pape
Message 4 of 4 in “post-receive-email hook: handle order of arguments consistently”
  1. post-receive-email hook: handle order of arguments consistentlyGerrit Pape, Jun 14, 2007
  2. Andy ParkinsJun 14, 2007
  3. post-receive-email hook: handle order of arguments consistentlyGerrit Pape, Aug 7, 2007
  4. Andy ParkinsAug 7, 2007

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.