git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* `.git` symlink makes `git submodule add` fail
@ 2016-02-12 16:48 Vít Novotný
  2016-02-12 18:09 ` Junio C Hamano
  0 siblings, 1 reply; 7+ messages in thread
From: Vít Novotný @ 2016-02-12 16:48 UTC (permalink / raw)
  To: git

Hi,

	$ uname -a
	Linux witiko 4.3.0-1-amd64 #1 SMP Debian 4.3.5-1 (2016-02-06) x86_64 GNU/Linux
	$ git --version
	git version 2.7.0

I tend to make `.git` a symlink, when I need to maintain several Git
repositories inside a single directory. This was always transparent to Git, but
problems arose, when working with submodules:

	$ mkdir -p .repos/repoA
	$ ln -s .repos/repoA .git
	$ git init
	Initialized empty Git repository in /tmp/tmp.q3hkme6nm4/.repos/repoA/
	$ git submodule add https://github.com/witiko/git-parallel
	Cloning into 'git-parallel'...
	remote: Counting objects: 212, done.
	remote: Compressing objects: 100% (16/16), done.
	remote: Total 212 (delta 6), reused 1 (delta 1), pack-reused 195
	Receiving objects: 100% (212/212), 64.20 KiB | 0 bytes/s, done.
	Resolving deltas: 100% (120/120), done.
	Checking connectivity... done.
	fatal: Could not chdir to '../../../git-parallel': No such file or directory
	Unable to checkout submodule 'git-parallel'

Is this a bug, or is the ability to symlink `.git` just a happy coincidence?

Best Regards,
Vít

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

end of thread, other threads:[~2016-02-13 18:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-12 16:48 `.git` symlink makes `git submodule add` fail Vít Novotný
2016-02-12 18:09 ` Junio C Hamano
2016-02-12 18:19   ` Junio C Hamano
2016-02-12 18:27     ` Jeff King
2016-02-13  4:20       ` Vít Novotný
2016-02-13 18:52         ` Jeff King
2016-02-12 18:36     ` Vít Novotný

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).