git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Loet Avramson <loet@forter.com>
To: git@vger.kernel.org
Subject: Submodule's .git file contains absolute path when created using 'git clone --recursive'
Date: Thu, 5 May 2016 12:51:22 +0000 (UTC)	[thread overview]
Message-ID: <loom.20160505T140253-275@post.gmane.org> (raw)

Hi,

According to git-clone man page - running 'git clone --recursive' "...is 
equivalent to running 'git submodule update --init --recursive' immediately 
after the clone is finished...", though I found a little difference between 
the two regarding the submodule's .git file:

1. Running 'git clone' and 'git submodule update --init --recursive' 
separately will create the .git file in each submodule containing a relative 
path to the superproject's .git directory as expected.

2. Running 'git clone --recursive' will create the .git file containing an 
*absolute* path to the superproject's .git directory. (as it was expected 
using git versions 1.7.8 - 1.7.10 as far as I understand)

Not sure if that's a bug but it got stuff behaving really weird in a specific 
usecase on one of our environments. It would be highly appreciated to update 
the docs at least.

Thanks.

 -Loet

             reply	other threads:[~2016-05-05 12:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-05 12:51 Loet Avramson [this message]
2016-05-05 17:19 ` Submodule's .git file contains absolute path when created using 'git clone --recursive' Junio C Hamano
2016-05-05 17:22 ` Stefan Beller
2016-05-05 19:20   ` Loet Avramson
2016-05-05 19:32     ` Stefan Beller
2016-07-12 11:22       ` Ricardo Sánchez-Sáez
2016-07-12 16:46         ` Stefan Beller

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=loom.20160505T140253-275@post.gmane.org \
    --to=loet@forter.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 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).