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

Re: Annoying absolute path for "core.worktree" to submodule

From
Jens Lehmann <jens.lehmann@web.de>
Date
Mar 21, 2012, 19:41 UTC
Message-ID
<4F6A2EF7.5090007@web.de>
In-Reply-To
<A5E8E180685CEF45AB9E737A010799802D9872@cdnz-ex1.corp.cubic.cub>
Am 20.03.2012 22:39, schrieb Holding, Lawrence:
> Slightly off topic, but related, what is the recommended way for finding
> the git folder from the top level project or any of the submodules?

Run "git rev-parse --git-dir" inside the repo whose git folder you want to know.

> And of finding the working tree from inside a hook script?

I would expect hooks to be run in the work tree's top level directory, but I haven't checked that.

Previous: Holding, LawrenceNext: Christian Hammerl
Message 4 of 5 in “Annoying absolute path for "core.worktree" to submodule”
  1. Christian HammerlMar 20, 2012
  2. Antony MaleMar 20, 2012
  3. Holding, LawrenceMar 20, 2012
  4. Jens LehmannMar 21, 2012
  5. Christian HammerlMar 21, 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.