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

pre-commit hook question

From
NDNick Dimov <dimovnike@gmail.com>
Date
Jun 14, 2014, 17:34 UTC
Message-ID
<539C8796.3070709@gmail.com>

Hello everyone. Im struggling for a couple of hours to make git store metadata of the files using metastore and I use hooks/pre-commit for this. The problem is that the script is invoked correctly, and modifies the file "metadata" but the file itself is not added into commit. I tried calling "git add metadata" and "git add -u metadata" but there is no effect. The file ends up uncommited and marked as modified or staged BUT not commited, ever.

Is there any way to make this work? Basically, I want it to update and commit the file "metadata" on each commit. (then i want to make the same on checkout, but first i need to make storing work correctly)

Thanks!

P.S. If you are wondering why I need this, the answer is I store OS files for an embedded device which needs permisions/suid flags etc.

Next: Junio C Hamano
Message 1 of 2 in “pre-commit hook question”
  1. Nick DimovJun 14, 2014
  2. Junio C HamanoJun 16, 2014

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.