From: Jens Lehmann <Jens.Lehmann@web.de>
To: Phil Hord <phil.hord@gmail.com>, Bob Halley <halley@play-bow.org>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: git-submodule path computation bug with recursive submodules
Date: Thu, 05 Jul 2012 20:34:24 +0200 [thread overview]
Message-ID: <4FF5DE30.6030100@web.de> (raw)
In-Reply-To: <CABURp0qtbSsiRX9sJ1F5WS3wtKq32hpV=3pGmM6Ysn=9Nvw_nQ@mail.gmail.com>
Am 05.07.2012 16:18, schrieb Phil Hord:
> On Thu, Jul 5, 2012 at 8:09 AM, Bob Halley <halley@play-bow.org> wrote:
>> The first level of submodule clones successfully, but submodule 'foo'
>> contains submodule 'bar', and cloning it fails.
>
> It fails for me too, running zsh and stock Linux.
>
> Seems to originate here.
>
> Commit: 69c3051780d6cacfe242563296160634dc667a90:
> Author: Jens Lehmann <Jens.Lehmann@web.de>
> Date: Sun Mar 4 22:15:36 2012 +0100
>
> submodules: refactor computation of relative gitdir path
Yup, thanks both for reporting and nailing that one down.
This diff fixes the problem for me and should be a portable way to
avoid "pwd -P" or "cd -P", I'll cook up a patch with test for that:
diff --git a/git-submodule.sh b/git-submodule.sh
index 5c61ae2..4a22555 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -150,8 +150,8 @@ module_clone()
die "$(eval_gettext "Clone of '\$url' into submodule path '\$sm_
fi
- a=$(cd "$gitdir" && pwd)/
- b=$(cd "$sm_path" && pwd)/
+ a=$(cd_to_toplevel && cd "$gitdir" && pwd)/
+ b=$(cd_to_toplevel && cd "$sm_path" && pwd)/
# normalize Windows-style absolute paths to POSIX-style absolute paths
case $a in [a-zA-Z]:/*) a=/${a%%:*}${a#*:} ;; esac
case $b in [a-zA-Z]:/*) b=/${b%%:*}${b#*:} ;; esac
prev parent reply other threads:[~2012-07-05 18:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-05 12:09 git-submodule path computation bug with recursive submodules Bob Halley
2012-07-05 14:18 ` Phil Hord
2012-07-05 18:34 ` Jens Lehmann [this message]
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=4FF5DE30.6030100@web.de \
--to=jens.lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=halley@play-bow.org \
--cc=phil.hord@gmail.com \
/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).