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

Re: bug when combined with etckeeper

From
Joey Hess <id@joeyh.name>
Date
Oct 10, 2018, 14:34 UTC
Message-ID
<20181010143427.GA2725@kitenet.net>
In-Reply-To
<4d7cddf8-34b3-eaa4-dc9e-e190062e6135@autistici.org>

/etc/.git/hooks/pre-commit is installed by etckeeper and runs etckeeper pre-commit, which deals with /etc/.etckeeper, including running "git add .etckeeper". Why that file would match a gitignore seems much less important than why git would run that hook in an entirely different git repository.

       core.hooksPath
           By default Git will look for your hooks in the $GIT_DIR/hooks
           directory. Set this to different path, e.g.  /etc/git/hooks, and Git
           will try to find your hooks in that directory, e.g.
           /etc/git/hooks/pre-receive instead of in $GIT_DIR/hooks/pre-receive.

Hmm, the example "/etc/git/hooks" there is very similar to the "/etc/.git/hooks" used by etckeeper. So my guess is you have core.hooksPath set globally.

-- 
see shy jo
Previous: Jeff KingNext: Naja Melan
Message 3 of 4 in “bug when combined with etckeeper”
  1. Naja MelanOct 10, 2018
  2. Jeff KingOct 10, 2018
  3. Joey HessOct 10, 2018
  4. Naja MelanOct 13, 2018

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.