All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Branchaud <marcnarc@xiplink.com>
To: Git Mailing List <git@vger.kernel.org>
Subject: Weird problem with git-submodule.sh
Date: Fri, 07 Dec 2012 12:44:53 -0500	[thread overview]
Message-ID: <50C22B15.1030607@xiplink.com> (raw)

Hi all,

This is with git 1.8.0.1 on all the machines involved.

One of our build machines is having trouble with "git submodule":

	$ git submodule init external/openssl
	No submodule mapping found in .gitmodules for path ''

(.gitmodules and other aspects of the repo are fine -- the submodules work
perfectly on other machines.)

The problem seems to be in cmd_init() with the construct

	module_list "$@" |
	while read mode sha1 stage sm_path
	do
		...

Explicitly setting IFS before the call to module_list makes it work:

	IFS=" "
	module_list "$@" |
	while read mode sha1 stage sm_path
	do
		...

If IFS is unset, the "while read" loop ends up with everything in the $mode
variable, and the other 3 variables are empty.

If I isolate module_list() and a simple "while read" loop into a standalone
script, like this:

	module_list()
	{
		...
	}

	module_list "$@" |
	while read mode sha1 stage sm_path
	do
		echo - $mode - $sha1 - $stage - $sm_path -
	done

It works -- each individual variable is set properly.

It seems that the problem only occurs inside git-submodule.sh.

Any ideas?

		M.

             reply	other threads:[~2012-12-07 17:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-07 17:44 Marc Branchaud [this message]
2012-12-07 17:54 ` Weird problem with git-submodule.sh Junio C Hamano
2012-12-07 18:03   ` Marc Branchaud
2012-12-07 19:11     ` Junio C Hamano
2012-12-07 20:17       ` Marc Branchaud
2012-12-07 20:23         ` Junio C Hamano
2012-12-07 20:44           ` Marc Branchaud
2012-12-07 21:08             ` Junio C Hamano
2012-12-07 22:34               ` [PATCH] sh-setup: work around "unset IFS" bug in some shells Junio C Hamano
2012-12-07 22:37                 ` Marc Branchaud
2012-12-07 22:50                 ` Andreas Schwab
2012-12-07 22:58                   ` Junio C Hamano
2012-12-08  9:25                     ` Andreas Schwab
2012-12-09 21:05               ` Weird problem with git-submodule.sh Stefano Lattarini
2012-12-12 19:10                 ` Phil Hord
2012-12-12 19:44                   ` Junio C Hamano
2012-12-12 23:12                     ` Phil Hord
2012-12-07 21:01           ` Marc Branchaud
2012-12-07 22:15         ` [PATCH] sh-setup: Explicitly set IFS to its default, instead of unsetting it marcnarc

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=50C22B15.1030607@xiplink.com \
    --to=marcnarc@xiplink.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.