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

Re: Bug: `git init` with hook `reference-transaction` running `git rev-parse --git-dir` fails

From
Gabriel Nützi <gnuetzi@gmail.com>
Date
Oct 7, 2024, 11:02 UTC
Message-ID
<a8807b44026458097267932f429ef61d5b77aa4c.camel@gmail.com>
In-Reply-To
<ZwO-j0C59vuYsEnt@pks.im>
Ah, jeah thats true:

The command in question which is `git rev-parse --git-dir` to find the actual GIT_DIR is actually the issue here: It relies on having a proper HEAD despite the docs saying it only reports GIT_DIR if set etc...

Could we maybe make these commands more agnostic? Making an empty HEAD probably directly also resolves these commands to work correctly.

Gabriel

-----Original Message----- **From**: Patrick Steinhardt <[ps@pks.im](mailto:Patrick%20Steinhardt%20%3cps@pks.im%3e)> **To**: Gabriel Nützi <[gnuetzi@gmail.com](mailto:Gabriel%20%3d%3fISO-8859-1%3fQ%3fN%3dFCtzi%3f%3d%20%3cgnuetzi@gmail.com%3e)> **Cc**: [git@vger.kernel.org](mailto:git@vger.kernel.org), Karthik Nayak <[karthik.188@gmail.com](mailto:Karthik%20Nayak%20%3ckarthik.188@gmail.com%3e)> **Subject**: Re: Bug: `git init` with hook `reference-transaction` running `git rev-parse --git-dir` fails **Date**: 10/07/2024 12:57:19 PM

git rev-parse --git-dir
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 6 of 14 in “Bug: `git init` with hook `reference-transaction` running `git rev-parse --git-dir` fails”
  1. Gabriel NütziSep 20, 2024
  2. Gabriel NütziSep 20, 2024
  3. Patrick SteinhardtOct 7, 2024
  4. Gabriel NütziOct 7, 2024
  5. Patrick SteinhardtOct 7, 2024
  6. Gabriel NütziOct 7, 2024
  7. Patrick SteinhardtOct 7, 2024
  8. Junio C HamanoOct 7, 2024
  9. Patrick SteinhardtOct 9, 2024
  10. Karthik NayakOct 9, 2024
  11. Gabriel NütziOct 9, 2024
  12. Patrick SteinhardtOct 9, 2024
  13. Junio C HamanoOct 9, 2024
  14. Patrick SteinhardtOct 14, 2024

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.