All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vít Novotný" <witiko@gmail.com>
To: git@vger.kernel.org
Subject: `.git` symlink makes `git submodule add` fail
Date: Fri, 12 Feb 2016 17:48:54 +0100	[thread overview]
Message-ID: <20160212164853.GA6888@witiko> (raw)

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

             reply	other threads:[~2016-02-12 16:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-12 16:48 Vít Novotný [this message]
2016-02-12 18:09 ` `.git` symlink makes `git submodule add` fail 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ý

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160212164853.GA6888@witiko \
    --to=witiko@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.