public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Eric Lesh <eclesh@ucla•edu>
To: Josef Sipek <jsipek@fsl•cs.sunysb.edu>
Cc: git@vger•kernel.org
Subject: Re: [GUILT PATCH 2/5] guilt-guard: Assign guards to patches in series
Date: Thu, 09 Aug 2007 00:34:48 -0700	[thread overview]
Message-ID: <87bqdhnotj.fsf@hubert.paunchy.net> (raw)
In-Reply-To: <20070731040510.GD12918@filer.fsl.cs.sunysb.edu> (Josef Sipek's message of "Tue\, 31 Jul 2007 00\:05\:10 -0400")

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

Josef Sipek <jsipek@fsl•cs.sunysb.edu> 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

  reply	other threads:[~2007-08-09  7:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-31  3:11 [GUILT PATCH v2 0/5] Add guards to guilt Eric Lesh
2007-07-31  3:11 ` [GUILT PATCH 1/5] get_series: Remove comments from end of series lines Eric Lesh
2007-07-31  3:50   ` Josef Sipek
2007-07-31  3:11 ` [GUILT PATCH 2/5] guilt-guard: Assign guards to patches in series Eric Lesh
2007-07-31  4:05   ` Josef Sipek
2007-08-09  7:34     ` Eric Lesh [this message]
2007-08-09  8:17       ` David Kastrup
2007-08-09  8:22         ` Thomas Adam
2007-08-09  8:43           ` David Kastrup
2007-08-09  8:53           ` Eric Lesh
2007-08-09  9:01         ` Eric Lesh
2007-08-09 13:47       ` Josef Sipek
2007-07-31  3:11 ` [GUILT PATCH 3/5] guilt-select: Select guards to apply when pushing patches Eric Lesh
2007-07-31  3:11 ` [GUILT PATCH 4/5] get_series: return guarded patches only Eric Lesh
2007-07-31  3:11 ` [GUILT PATCH 5/5] Guards test suite Eric Lesh
2007-07-31  3:42 ` [GUILT PATCH v2 0/5] Add guards to guilt Josef Sipek

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=87bqdhnotj.fsf@hubert.paunchy.net \
    --to=eclesh@ucla$(echo .)edu \
    --cc=git@vger$(echo .)kernel.org \
    --cc=jsipek@fsl$(echo .)cs.sunysb.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox