Re: [PATCH v2 0/8] git-submodule.sh: improve parsing of options

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

 



Roy E <royeldar0@xxxxxxxxx> writes:

>> I am assuming (but I don't use "git submodule" very often, so my
>> assumption may be way off) that there is no such variable we need to
>> pass, but if not, we may need to reconsider and use the "variable has
>> only value of the option" for at least some of them.
>
> Indeed, there aren't such variables; all of the options which take
> arguments have exactly one argument.

Just to make sure we are on the same page,

    --foo "hello world"

is an example of an option "foo" that takes exactly one argument, a
string which happens to have a whitespace in it, and is an example
for which "variable has the dash-dash option, equals, and its value"
pattern would not work well.

If we pass an argument that is an end-user provided message or is a
project controlled pathname, we are likely to be in the same
situation.

If we can pass it as

    --foo="hello world"

then we are safe, as we can do

	foo="--foo=hello world"
	... later ...
	git cmd ${foo:+"$foo"}




[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]

  Powered by Linux