git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Bug with git-submodule and IFS

From
ADAndrew Dranse <adranse@oanda.com>
Date
Aug 8, 2012, 18:21 UTC
Message-ID
<1844267106.216233.1344450083762.JavaMail.root@sms-zimbra-message-store-03.sms.scalar.ca>
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: Junio C Hamano
Message 1 of 2 in “Bug with git-submodule and IFS”
  1. Andrew DranseAug 8, 2012
  2. Junio C HamanoAug 8, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.