From: Junio C Hamano Date: Wed, 11 Apr 2012 17:11:25 GMT Subject: Re: [PATCH] tests: modernise style: more uses of test_line_count Message-ID: <7vty0qkxc2.fsf@alter.siamese.dyndns.org> In-Reply-To: <7vy5q2ky7d.fsf@alter.siamese.dyndns.org> Junio C Hamano writes: > I'll squash this in, but otherwise it looks good. There is nothing > conflicting in flight right now. In case somebody is curious, I've eyeballed the result of applying this patch to v1.7.10 and the result of running the following on v1.7.10 to find these three. The other differences looked fine; we lost a few variables like $loglen but they are not otherwise used, which was harder to see without enough context. -- >8 -- #!/bin/sh perl -i -p -e ' s/test\s+\$\(wc\s+-l\s+<\s*([.\/a-zA-Z0-9_]+)\)\s+(?:=|-eq)\s+"?(\d+)"? /test_line_count = $2 $1/x; s/test\s+"?(\d+)"?\s+(?:=|-eq)\s+\$\(wc\s+-l\s+<\s*([.\/a-zA-Z0-9_]+)\) /test_line_count = $1 $2/x; s/test\s+\`wc\s+-l\s+<\s*([.\/a-zA-Z0-9_]+)\`\s+(?:=|-eq)\s+"?(\d+)"? /test_line_count = $2 $1/x; s/test\s+"?(\d+)"?\s+(?:=|-eq)\s+\`wc\s+-l\s+<\s*([.\/a-zA-Z0-9_]+)\` /test_line_count = $1 $2/x; ' t/t[0-9][0-9][0-9][0-9]-*.sh