* [PATCH] Avoid perl in t1300-repo-config
@ 2007-06-27 12:45 Alex Riesen
2007-06-27 15:15 ` Frank Lichtenheld
2007-06-28 4:30 ` Junio C Hamano
0 siblings, 2 replies; 9+ messages in thread
From: Alex Riesen @ 2007-06-27 12:45 UTC (permalink / raw)
To: Git Mailing List; +Cc: Frank Lichtenheld, Junio C Hamano
[-- Attachment #1: Type: text/plain, Size: 227 bytes --]
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(-)
[-- Attachment #2: 0001-Avoid-perl-in-t1300-repo-config.txt --]
[-- Type: text/plain, Size: 1472 bytes --]
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
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] Avoid perl in t1300-repo-config
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
1 sibling, 1 reply; 9+ messages in thread
From: Frank Lichtenheld @ 2007-06-27 15:15 UTC (permalink / raw)
To: Alex Riesen; +Cc: Git Mailing List, Junio C Hamano
On Wed, Jun 27, 2007 at 02:45:40PM +0200, Alex Riesen wrote:
> It fixes the test on system where ActiveState Perl is used.
> It is also shorter.
Thanks :)
For future reference: What in my code broke with ActiveState Perl?
The command line options?
Gruesse,
--
Frank Lichtenheld <frank@lichtenheld.de>
www: http://www.djpig.de/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Avoid perl in t1300-repo-config
2007-06-27 15:15 ` Frank Lichtenheld
@ 2007-06-27 15:47 ` Alex Riesen
0 siblings, 0 replies; 9+ messages in thread
From: Alex Riesen @ 2007-06-27 15:47 UTC (permalink / raw)
To: Frank Lichtenheld; +Cc: Git Mailing List, Junio C Hamano
On 6/27/07, Frank Lichtenheld <frank@lichtenheld.de> wrote:
> On Wed, Jun 27, 2007 at 02:45:40PM +0200, Alex Riesen wrote:
> > It fixes the test on system where ActiveState Perl is used.
> > It is also shorter.
>
> Thanks :)
>
> For future reference: What in my code broke with ActiveState Perl?
> The command line options?
>
Nothing really, the code is perfect and options are correct.
ActiveState is just clueless, and activates \r\n line endings
on stdout/stderr by default, unless the stream is binmoded
(irrespective of whether the stream is tty or not).
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Avoid perl in t1300-repo-config
2007-06-27 12:45 [PATCH] Avoid perl in t1300-repo-config Alex Riesen
2007-06-27 15:15 ` Frank Lichtenheld
@ 2007-06-28 4:30 ` Junio C Hamano
2007-06-28 7:41 ` Alex Riesen
1 sibling, 1 reply; 9+ messages in thread
From: Junio C Hamano @ 2007-06-28 4:30 UTC (permalink / raw)
To: Alex Riesen; +Cc: Git Mailing List, Frank Lichtenheld, Junio C Hamano
"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?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Avoid perl in t1300-repo-config
2007-06-28 4:30 ` Junio C Hamano
@ 2007-06-28 7:41 ` Alex Riesen
2007-06-28 8:56 ` Alex Riesen
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Alex Riesen @ 2007-06-28 7:41 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Git Mailing List, Frank Lichtenheld
On 6/28/07, Junio C Hamano <gitster@pobox.com> wrote:
> "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)=...
> > +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?
Dunno. Have yet too meet a system where it doesn't work.
That said, SUSv6 does not mention it.
> 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.
Will try that.
> By the way, is it possible for gmail users to avoid attachments
> when sending patches in?
No. The message text is unpredictably garbled
^ permalink raw reply [flat|nested] 9+ messages in thread* [PATCH] Avoid perl in t1300-repo-config
2007-06-28 7:41 ` Alex Riesen
@ 2007-06-28 8:56 ` Alex Riesen
2007-06-28 9:28 ` Jakub Narebski
2007-06-28 14:19 ` Johannes Schindelin
2 siblings, 0 replies; 9+ messages in thread
From: Alex Riesen @ 2007-06-28 8:56 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Git Mailing List, Frank Lichtenheld
[-- Attachment #1: Type: text/plain, Size: 1100 bytes --]
It fixes the test on systems where ActiveState Perl is used.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
t/t1300-repo-config.sh | 22 ++++++++++------------
1 files changed, 10 insertions(+), 12 deletions(-)
On 6/28/07, Alex Riesen <raa.lkml@gmail.com> wrote:
> On 6/28/07, Junio C Hamano <gitster@pobox.com> wrote:
> > "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)=...
> > > +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?
>
> Dunno. Have yet too meet a system where it doesn't work.
> That said, SUSv6 does not mention it.
>
> > 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.
>
> Will try that.
>
So I did. Any idea as to how make the here-document
_without_ the trailing LF?
[-- Attachment #2: 0001-Avoid-perl-in-t1300-repo-config.txt --]
[-- Type: text/plain, Size: 1628 bytes --]
From 846fcfe47938ee894eb433b6f3a24ae4b6479e5b 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.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
t/t1300-repo-config.sh | 22 ++++++++++------------
1 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index 7a77bef..27486de 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -529,25 +529,23 @@ cat > .git/config <<\EOF
EOF
cat > expect <<\EOF
-Key: section.sub=section.val1
-Value: foo=bar
-Key: section.sub=section.val2
-Value: foo
-bar
-Key: section.sub=section.val3
-Value:
+section.sub=section.val1
+foo=barQsection.sub=section.val2
+foo
+barQsection.sub=section.val3
-Key: section.sub=section.val4
-Value:
-Key: section.sub=section.val5
+Qsection.sub=section.val4
+Qsection.sub=section.val5Q
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 | tr '[\000]' 'Q' > result
+echo >>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]' | tr '[\000]' 'Q' > result
+echo >>result
test_expect_success '--null --get-regexp' 'cmp result expect'
--
1.5.2.2.1308.g540b6
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] Avoid perl in t1300-repo-config
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
2 siblings, 1 reply; 9+ messages in thread
From: Jakub Narebski @ 2007-06-28 9:28 UTC (permalink / raw)
To: git
Alex Riesen wrote:
>> By the way, is it possible for gmail users to avoid attachments
>> when sending patches in?
>
> No. The message text is unpredictably garbled
If by "gmail users" you mean gmail web interface, then probably no.
No problems with using gmail from email client or from git-send-email
(the latter after configuring sendmail in my case).
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Avoid perl in t1300-repo-config
2007-06-28 9:28 ` Jakub Narebski
@ 2007-06-28 11:00 ` Alex Riesen
0 siblings, 0 replies; 9+ messages in thread
From: Alex Riesen @ 2007-06-28 11:00 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
On 6/28/07, Jakub Narebski <jnareb@gmail.com> wrote:
> >> By the way, is it possible for gmail users to avoid attachments
> >> when sending patches in?
> >
> > No. The message text is unpredictably garbled
>
> If by "gmail users" you mean gmail web interface, then probably no.
> No problems with using gmail from email client or from git-send-email
> (the latter after configuring sendmail in my case).
Can't. M$ Exchange plagued
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Avoid perl in t1300-repo-config
2007-06-28 7:41 ` Alex Riesen
2007-06-28 8:56 ` Alex Riesen
2007-06-28 9:28 ` Jakub Narebski
@ 2007-06-28 14:19 ` Johannes Schindelin
2 siblings, 0 replies; 9+ messages in thread
From: Johannes Schindelin @ 2007-06-28 14:19 UTC (permalink / raw)
To: Alex Riesen; +Cc: Junio C Hamano, Git Mailing List, Frank Lichtenheld
Hi,
On Thu, 28 Jun 2007, Alex Riesen wrote:
> On 6/28/07, Junio C Hamano <gitster@pobox.com> wrote:
>
> > By the way, is it possible for gmail users to avoid attachments when
> > sending patches in?
>
> No. The message text is unpredictably garbled
It is not really unpredictable.
- whitespace at the end of line is stripped
- too long lines are _always_ broken (and our diffstat lines qualify for
that)
- empty lines at the end of the message are stripped (does not concern us)
- empty lines at the beginning of the message are stripped (does not
concern us either)
- encodings different from UTF-8 are a problem
Of course, the first reason already precludes diffs from being sent. Just
think of an empty line, which is in both versions (or even worse, a single
space on the line).
Ciao,
Dscho
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-06-28 14:25 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
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).