Re: [PATCH] tests: modernise style: more uses of test_line_count

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]