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

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git@...>
Date: Thursday, August 9, 2007 - 4:17 am

Eric Lesh <eclesh@ucla.edu> writes:


The problem with the above is that it reacts strangely to multiline
options.

Should be much better (and faster on shells without builtin printf) to
use

case "$x" in
   [+-]*)
     sed -i -e ...  ;;
       *)
     echo "'$x' is not ...
esac

and this runs portably without forking on shells that are 30 years
old.  Shell script programmers _really_ should know "case" inside out.

Also, instead of 'for x in "$@"' one can just write "for x'


\ does not need to be escaped in double quotes except before \, $ and `.
You can write

    sed -i -e "s,^\($p[[:space:]]*.*\)\$,\1 #$x," "$series"

and that's fine.

-- 
David Kastrup

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [GUILT PATCH 2/5] guilt-guard: Assign guards to patches ..., David Kastrup, (Thu Aug 9, 4:17 am)