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

Re: git submodule ignores --git-dir

From
FGFilip Gospodinov <filip.gospodinov@monetas.net>
Date
Sep 14, 2015, 13:25 UTC
Message-ID
<55F6CADA.9000100@monetas.net>
In-Reply-To
<20150911152807.GA17201@serenity.lan>
On 11.09.2015 17:15, Jens Lehmann wrote:
Show 8 quoted lines
> Unfortunately trying to show git the right work tree:
>
> $ git --git-dir=$PWD/repo2/.git --work-tree=$PWD/repo2 submodule update --init
>
> Didn't work as I expected it to either:
>
> fatal: /home/Sledge/libexec/git-core/git-submodule cannot be used without a
> working tree.

Yes, that's confusing. I'm not sure how other commands use the --work-tree flag and if having the git-submodule script `cd` into the work tree would be acceptable. What do you think?

On 11.09.2015 17:28, John Keeping wrote:
> There's also "git -C /path/to/repo" which avoids the need for a separate
> "cd".
> 
Thank you, that works!
Previous: John Keeping
Message 4 of 4 in “git submodule ignores --git-dir”
  1. Filip GospodinovSep 10, 2015
  2. Jens LehmannSep 11, 2015
  3. John KeepingSep 11, 2015
  4. Filip GospodinovSep 14, 2015

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.