Weird problem with git-submodule.sh

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]