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

Re: Arguments to git hooks

From
jaseem abid <jaseemabid@gmail.com>
Date
May 6, 2012, 21:40 UTC
Message-ID
<CAH-tXsDe7Hsacz19egdeW2sDV3SoPkJpJLPAmk_pCoEiR3wvcQ@mail.gmail.com>
In-Reply-To
<20120506211120.GC5725@moj>
On Mon, May 7, 2012 at 2:41 AM, Marcus Karlsson <mk@acc.umu.se> wrote:
> There are many different reasons to use hooks. If everything that a hook
> could potentially need was passed to it as an argument then a lot of
> data would often end up unused. Better to supply as little as possible
> and only do more work when it's actually needed.

That seems like a good reason not to pass all of the data, but isn't the file names the most primary thing somebody can ask for?

Show 5 quoted lines
>> Are you suggesting me to run some plumbing command, parse the result
>> and get the required data ? Is there an easier way to get this done?
>
> I wouldn't go as deep as the plumbing, I think git status --porcelain
> should work just fine, the output is fairly easy to parse.

I have always wondered why 'git status --porcelain' is giving a 'plumbing' style output. Any docs on this somewhere?

-- 
Jaseem Abid
http://jaseemabid.github.com
Previous: Marcus KarlssonNext: Jeff King
Message 5 of 9 in “Arguments to git hooks”
  1. jaseem abidMay 6, 2012
  2. Marcus KarlssonMay 6, 2012
  3. jaseem abidMay 6, 2012
  4. Marcus KarlssonMay 6, 2012
  5. jaseem abidMay 6, 2012
  6. Jeff KingMay 7, 2012
  7. Jeff KingMay 7, 2012
  8. Andrew SayersMay 7, 2012
  9. jaseem abidMay 14, 2012

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.