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

Re: [PATCH] Avoid perl in t1300-repo-config

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 28, 2007, 04:30 UTC
Message-ID
<7vmyykog4e.fsf@assigned-by-dhcp.pobox.com>
In-Reply-To
<81b0412b0706270545w65ca2556yaafaac6ff31b5961@mail.gmail.com>
"Alex Riesen" <raa.lkml@gmail.com> writes:
Show 5 quoted lines
> It fixes the test on system where ActiveState Perl is used.
> It is also shorter.
> ...
> -git config --null --list | perl -0ne 'chop;($key,$value)=split(/\n/,$_,2);print "Key: $key\n";print "Value: $value\n" if defined($value)' > result
> +git config --null --list | xargs -n1 -0 echo 'Key:' > result

This now makes us rely on "xargs -0", which is probably much less portable than Perl isn't it? Because the point of the test is that it can show things in NUL terminated format, I'd rather keep it use a bit more portable stuff. Also I am not sure if the two tests are really testing the same thing.

Maybe postprocess "git config -z" output with "tr '[\000]' 'Q'" or something so that the comparison of the result does not have to worry about NULs? I dunno.

By the way, is it possible for gmail users to avoid attachments when sending patches in?

Previous: Alex RiesenNext: Alex Riesen
Message 4 of 9 in “Avoid perl in t1300-repo-config”
  1. Avoid perl in t1300-repo-configAlex Riesen, Jun 27, 2007
  2. Frank LichtenheldJun 27, 2007
  3. Alex RiesenJun 27, 2007
  4. Junio C HamanoJun 28, 2007
  5. Alex RiesenJun 28, 2007
  6. Avoid perl in t1300-repo-configAlex Riesen, Jun 28, 2007
  7. Jakub NarebskiJun 28, 2007
  8. Alex RiesenJun 28, 2007
  9. Johannes SchindelinJun 28, 2007

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.