`.git` symlink makes `git submodule add` fail

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]