From mboxrd@z Thu Jan 1 00:00:00 1970 From: cgit at cryptocrack.de (Lukas Fleischer) Date: Sat, 21 Jan 2012 21:39:19 +0100 Subject: [PATCH 2/2] tests: properly quote more variables In-Reply-To: <4F188659.6090300@hupie.com> References: <1327001055-29027-1-git-send-email-mailings@hupie.com> <1327001055-29027-2-git-send-email-mailings@hupie.com> <20120119205718.GB13613@blizzard> <4F188659.6090300@hupie.com> Message-ID: <20120121203919.GA10901@blizzard> On Thu, Jan 19, 2012 at 10:08:41PM +0100, Ferry Huberts wrote: > > > On 19-01-12 21:57, Lukas Fleischer wrote: > >On Thu, Jan 19, 2012 at 08:24:15PM +0100, Ferry Huberts wrote: > >>From: Ferry Huberts > >> > >>Signed-off-by: Ferry Huberts > >>--- > >> tests/setup.sh | 8 ++++---- > >> 1 files changed, 4 insertions(+), 4 deletions(-) > >> > >>diff --git a/tests/setup.sh b/tests/setup.sh > >>index 3b52de9..c54609c 100755 > >>--- a/tests/setup.sh > >>+++ b/tests/setup.sh > >>@@ -18,11 +18,11 @@ > >> unset CDPATH > >> > >> mkrepo() { > >>- name=$1 > >>+ name="$1" > >> count=$2 > >> dir="$PWD" > >> test -d "$name"&& return > >>- printf "Creating testrepo %s\n" $name > >>+ printf "Creating testrepo %s\n" "$name" > > > >Only this +/-1 line patch is needed - we don't need to quote right-hand > >side of assignments here (for details, read my reply to the other patch > >in this series). > > > > yeah, but it won't hurt either. > and is more consistent No, it doesn't break anything, of course. I just don't think we should introduce no-op quotes in some assignments and keep unquoted variables in others (like '$name="$1"' and 'count=$2' above). It's the opposite of consistency, actually... > > >> mkdir -p "$name" > >> cd "$name" > >> git init > >>@@ -114,8 +114,8 @@ run_test() > >> bug=1 > >> shift > >> fi > >>- desc=$1 > >>- script=$2 > >>+ desc="$1" > >>+ script="$2" > >> test_count=$(expr $test_count + 1) > >> printf "\ntest %d: name='%s'\n" $test_count "$desc">>test-output.log > >> printf "test %d: eval='%s'\n" $test_count "$2">>test-output.log > >>-- > >>1.7.7.5 > >> > >> > >>_______________________________________________ > >>cgit mailing list > >>cgit at hjemli.net > >>http://hjemli.net/mailman/listinfo/cgit > > > >_______________________________________________ > >cgit mailing list > >cgit at hjemli.net > >http://hjemli.net/mailman/listinfo/cgit > > -- > Ferry Huberts