git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Alex Riesen" <raa.lkml@gmail.com>
Cc: "Git Mailing List" <git@vger.kernel.org>,
	"Frank Lichtenheld" <frank@lichtenheld.de>,
	"Junio C Hamano" <gitster@pobox.com>
Subject: Re: [PATCH] Avoid perl in t1300-repo-config
Date: Wed, 27 Jun 2007 21:30:25 -0700	[thread overview]
Message-ID: <7vmyykog4e.fsf@assigned-by-dhcp.pobox.com> (raw)
In-Reply-To: 81b0412b0706270545w65ca2556yaafaac6ff31b5961@mail.gmail.com

"Alex Riesen" <raa.lkml@gmail.com> writes:

> 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?

  parent reply	other threads:[~2007-06-28  4:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-27 12:45 [PATCH] Avoid perl in t1300-repo-config Alex Riesen
2007-06-27 15:15 ` Frank Lichtenheld
2007-06-27 15:47   ` Alex Riesen
2007-06-28  4:30 ` Junio C Hamano [this message]
2007-06-28  7:41   ` Alex Riesen
2007-06-28  8:56     ` Alex Riesen
2007-06-28  9:28     ` Jakub Narebski
2007-06-28 11:00       ` Alex Riesen
2007-06-28 14:19     ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vmyykog4e.fsf@assigned-by-dhcp.pobox.com \
    --to=gitster@pobox.com \
    --cc=frank@lichtenheld.de \
    --cc=git@vger.kernel.org \
    --cc=raa.lkml@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).