git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
JSJosef Sipek <jsipek@fsl.cs.sunysb.edu>
Date
Aug 9, 2007, 13:47 UTC
Message-ID
<20070809134715.GA22563@filer.fsl.cs.sunysb.edu>
In-Reply-To
<87bqdhnotj.fsf@hubert.paunchy.net>
On Thu, Aug 09, 2007 at 12:34:48AM -0700, Eric Lesh wrote:
> [ I'm finally back to this.  Thanks for your comments. ]
Good. I was starting to get worried :)
Show 16 quoted lines
> 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?
Right, "local" is a bashism therefore you must use a subshell (paretheses).
Show 9 quoted lines
> >> +	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 --.
Good enough reason :)
...
> 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!

I'd use it at times. For certain scenarios (2 series that are mostly identical) using guards makes more sense than different branches.

Thanks,
Josef 'Jeff' Sipek.
-- 
Humans were created by water to transport it upward.
Previous: Eric LeshNext: Eric Lesh
Message 12 of 16 in “Add guards to guilt”
  1. 0/5 Add guards to guiltEric Lesh, Jul 31, 2007
  2. 1/5 get_series: Remove comments from end of series linesEric Lesh, Jul 31, 2007
  3. Josef SipekJul 31, 2007
  4. 2/5 guilt-guard: Assign guards to patches in seriesEric Lesh, Jul 31, 2007
  5. Josef SipekJul 31, 2007
  6. Eric LeshAug 9, 2007
  7. David KastrupAug 9, 2007
  8. Thomas AdamAug 9, 2007
  9. David KastrupAug 9, 2007
  10. Eric LeshAug 9, 2007
  11. Eric LeshAug 9, 2007
  12. Josef SipekAug 9, 2007
  13. 3/5 guilt-select: Select guards to apply when pushing patchesEric Lesh, Jul 31, 2007
  14. 4/5 get_series: return guarded patches onlyEric Lesh, Jul 31, 2007
  15. 5/5 Guards test suiteEric Lesh, Jul 31, 2007
  16. Josef SipekJul 31, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.