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

pre-receive hook ; how to detect file and append code ?

From
JBJ. Bakshi <joydeep.bakshi@infoservices.in>
Date
Jun 22, 2012, 13:07 UTC
Message-ID
<20120622183709.2f0beaa6@shiva.selfip.org>
Dear list,

How can I detect a specific file during push, if it is modified or not ? And how can I then append a block of code into that file; if modified during push ? I think pre-receive hook is the best for this operation.

Thanks
Next: Thomas Adam
Message 1 of 4 in “pre-receive hook ; how to detect file and append code ?”
  1. J. BakshiJun 22, 2012
  2. Thomas AdamJun 22, 2012
  3. Junio C HamanoJun 22, 2012
  4. J. BakshiJun 25, 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.