git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 11, 2012, 17:11 UTC
Message-ID
<7vty0qkxc2.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7vy5q2ky7d.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> 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
Previous: Junio C HamanoNext: Stefano Lattarini
Message 3 of 4 in “tests: modernise style: more uses of test_line_count”
  1. tests: modernise style: more uses of test_line_countStefano Lattarini, Apr 11, 2012
  2. Junio C HamanoApr 11, 2012
  3. Junio C HamanoApr 11, 2012
  4. Stefano LattariniApr 11, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.