Re: [GUILT PATCH 2/5] guilt-guard: Assign guards to patches in series

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

 



[ I'm finally back to this.  Thanks for your comments. ]

Josef Sipek <jsipek@xxxxxxxxxxxxxxxxx> writes:

[...]

>> +}
>> +
>> +# usage: set_guards <patch> <guards...>
>> +set_guards()
>> +{
>> +	p="$1"
>
> Again, be careful about namespace polution.
>

Can I use "local", or is it a bashism?  If not, use parentheses around
the function body?

>> +	shift
>> +	for x in "$@"; do
>> +		if [ -z $(printf %s "$x" | grep -e "^[+-]") ]; then
>
> Out of curiosity, why printf and not echo?
>

For guards named '-e' or other funky things echo doesn't like and can't
process with echo --.

>> +			echo "'$x' is not a valid guard name"
>> +		else
>> +			sed -i -e "s,^\($p[[:space:]]*.*\)$,\1 #$x," "$series"
>
> The regexp is in double quotes, so you should escape the $ (EOL), as well as
> all the \. Yep, this is shell scripting at its worst.
>

Yikes.

[...]

I'm trying to clean the rest and get it ready again. This whole series
will definitely need to incubate for a while once there's a
reasonable-looking version, to make sure nothing goes crazy.  Hopefully
it ends up being useful somewhere!

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

  Powered by Linux