git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Bug? clone ignores --git-dir
@ 2019-11-26 18:07 Jack Bates
  2019-11-27 11:51 ` Jeff King
  2019-11-27 12:33 ` Junio C Hamano
  0 siblings, 2 replies; 4+ messages in thread
From: Jack Bates @ 2019-11-26 18:07 UTC (permalink / raw)
  To: git

If you `git rebase --exec 'gulp runtests-parallel --runners user'` this 
project, the tests perform Git operations on various subprojects [1], 
but because Git exports `GIT_DIR` and `GIT_WORK_TREE`, they end up 
operating on the parent project instead.

Adding `--git-dir` and `--work-tree` overrides `GIT_DIR` and 
`GIT_WORK_TREE` [2], forcing the tests to operate on the correct 
repositories, however `clone` ignores `--git-dir`:

> git init repository
> git --git-dir git-dir clone repository directory
I'd expect Git to create a directory `git-dir` and put the index, etc. 
there, but instead it creates `directory/.git`, as usual. I'm not sure 
if this is a bug or the expected behavior?

[1] 
https://github.com/microsoft/TypeScript/blob/master/src/testRunner/externalCompileRunner.ts#L58
[2] https://github.com/microsoft/TypeScript/pull/35362

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-11-27 20:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-26 18:07 Bug? clone ignores --git-dir Jack Bates
2019-11-27 11:51 ` Jeff King
2019-11-27 12:33 ` Junio C Hamano
2019-11-27 20:19   ` Jack Bates

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).