From: Andrew Dranse <adranse@oanda.com>
To: git@vger.kernel.org
Subject: Bug with git-submodule and IFS
Date: Wed, 8 Aug 2012 14:21:23 -0400 (EDT) [thread overview]
Message-ID: <1844267106.216233.1344450083762.JavaMail.root@sms-zimbra-message-store-03.sms.scalar.ca> (raw)
In-Reply-To: <1496197024.216188.1344449732940.JavaMail.root@sms-zimbra-message-store-03.sms.scalar.ca>
Hi there,
I ran into an interesting bug with git submodules today. It appears that if your IFS is not set to what git-submodule expects it to be (i.e. the standard IFS), it will break in a fun way.
Example:
$ git init
Initialized empty Git repository in /home/adranse/test/.git/
$ git submodule add github:/repos/perf
Cloning into 'perf'...
remote: Counting objects: 5744, done.
remote: Compressing objects: 100% (4627/4627), done.
remote: Total 5744 (delta 2400), reused 1579 (delta 343)
Receiving objects: 100% (5744/5744), 28.78 MiB | 4.56 MiB/s, done.
Resolving deltas: 100% (2400/2400), done.
$ export IFS="
> "
$ git submodule update --init --recursive
No submodule mapping found in .gitmodules for path ''
$ unset IFS
$ git submodule update --init --recursive
Submodule 'perf' () registered for path 'perf'
As a solution, I would suggest setting IFS to the expected value before calling the git-submodule shell script.
Thanks,
Andrew Dranse
OANDA Corporation
adranse@oanda.com
next parent reply other threads:[~2012-08-08 18:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1496197024.216188.1344449732940.JavaMail.root@sms-zimbra-message-store-03.sms.scalar.ca>
2012-08-08 18:21 ` Andrew Dranse [this message]
2012-08-08 19:08 ` Bug with git-submodule and IFS Junio C Hamano
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=1844267106.216233.1344450083762.JavaMail.root@sms-zimbra-message-store-03.sms.scalar.ca \
--to=adranse@oanda.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).