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

Re: Bug? clone ignores --git-dir

From
JBJack Bates <bk874k@nottheoilrig.com>
Date
Nov 27, 2019, 20:19 UTC
Message-ID
<91fa0f24-fd11-a0ff-c258-c0f480910ade@nottheoilrig.com>
In-Reply-To
<xmqqh82pv6qi.fsf@gitster-ct.c.googlers.com>
On 2019-11-27 5:33 a.m., Junio C Hamano wrote:
> An intentional design decision (and it may be an unfortunate one by
> now [*1*]) was to have the GIT_DIR (hence --git-dir) talk about the
> *source side* of the clone, not the destination, e.g.

Ah ha, the following does what I want, regardless of `GIT_DIR`/`GIT_WORK_TREE`:

> git init repository
> GIT_DIR=bogus GIT_WORK_TREE=bogus git --work-tree directory clone repository directory/.git
Thank you!
Previous: Junio C Hamano
Message 4 of 4 in “Bug? clone ignores --git-dir”
  1. Jack BatesNov 26, 2019
  2. Jeff KingNov 27, 2019
  3. Junio C HamanoNov 27, 2019
  4. Jack BatesNov 27, 2019

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.