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

[PATCH] Avoid perl in t1300-repo-config

From
Alex Riesen <raa.lkml@gmail.com>
Date
Jun 27, 2007, 12:45 UTC
Message-ID
<81b0412b0706270545w65ca2556yaafaac6ff31b5961@mail.gmail.com>

It fixes the test on system where ActiveState Perl is used. It is also shorter.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
 t/t1300-repo-config.sh |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
From e844edbdc63150386dc4eb2c2080ece4f371cd04 Mon Sep 17 00:00:00 2001
From: Alex Riesen <raa.lkml@gmail.com>
Date: Wed, 27 Jun 2007 14:40:41 +0200
Subject: [PATCH] Avoid perl in t1300-repo-config

It fixes the test on system where ActiveState Perl is used. It is shorter as a bonus.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
 t/t1300-repo-config.sh |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index 7a77bef..60b0dc5 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -530,24 +530,24 @@ EOF
 
 cat > expect <<\EOF
 Key: section.sub=section.val1
-Value: foo=bar
+foo=bar
 Key: section.sub=section.val2
-Value: foo
+foo
 bar
 Key: section.sub=section.val3
-Value: 
+
 
 
 Key: section.sub=section.val4
-Value: 
+
 Key: section.sub=section.val5
 EOF
 
-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
 
 test_expect_success '--null --list' 'cmp result expect'
 
-git config --null --get-regexp 'val[0-9]' | perl -0ne 'chop;($key,$value)=split(/\n/,$_,2);print "Key: $key\n";print "Value: $value\n" if defined($value)' > result
+git config --null --get-regexp 'val[0-9]' | xargs -n1 -0 echo 'Key:' > result
 
 test_expect_success '--null --get-regexp' 'cmp result expect'
 
-- 
1.5.2.2.1308.g540b6
Next: Frank Lichtenheld
Message 1 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.