From: Junio C Hamano Date: Wed, 06 Jun 2007 20:53:48 GMT Subject: Re: [PATCH] filter-branch: use sh -c instead of eval Message-ID: <7vd508ztwj.fsf@assigned-by-dhcp.cox.net> In-Reply-To: Johannes Sixt writes: > Matthias Lederhofer wrote: > >> If filters use variables with the same name as variables >> used in the script the script breaks. Executing the filters >> in a separate process prevents accidential modification of >> the variables in the main process. >> @@ -349,21 +349,21 @@ while read commit; do >> >> eval "$(set_ident AUTHOR <../commit)" >> eval "$(set_ident COMMITTER <../commit)" >> - eval "$filter_env" < /dev/null >> + sh -c "$filter_env" < /dev/null > > NACK. > > The eval is on purpose here. $filter_env must be able export GIT_AUTHOR* and > GIT_COMMITTER* variables here. True. The other hunks may be improvements, though.