* 195b7ca6 breaks t9010 at current master
@ 2011-03-29 2:08 Øyvind A. Holm
2011-03-29 4:24 ` Jonathan Nieder
0 siblings, 1 reply; 7+ messages in thread
From: Øyvind A. Holm @ 2011-03-29 2:08 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Jonathan Nieder
When running "make test" at current master (v1.7.4.2-406-gbe919d5),
t9010-svn-fe.sh fails. Bisecting shows that 195b7ca6 ("vcs-svn: handle
log message with embedded NUL") breaks the test. The test runs fine
after 195b7ca6 is reverted. These tests succeeds without the commit, but
fails when it’s applied:
- empty properties
- author name and commit message
- unsupported properties are ignored
- directory with files
- NUL in property value
- change file mode and reiterate content
- property deltas supported
- properties on /
- deltas for typechange
- t9135/svn.dump
In addition, this test introduced in 195b7ca6 fails:
- NUL in log message, file content, and property name
Tested on four different Linux systems (two with the same Ubuntu
version), all with the same result. Tested with default Makefile and
also "make configure".
System info:
Ubuntu 10.04.2 LTS
gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
svn, version 1.6.6 (r40053)
DebianEdu/Skolelinux (terra) (Based on Debian release 5.0.8, lenny)
gcc (Debian 4.3.2-1.1) 4.3.2
svn, version 1.5.1 (r32289)
Debian GNU/Linux 5.0.8 (lenny)
gcc (Debian 4.3.2-1.1) 4.3.2
svn, version 1.5.1 (r32289)
Output from t9010-svn-fe.sh at current master (v1.7.4.2-406-gbe919d5):
ok 93 - --force sends cover letter template anyway
# passed all 93 test(s)
1..93
*** t9010-svn-fe.sh ***
ok 1 - empty dump
ok 2 - v4 dumps not supported
not ok 3 - empty revision # TODO known breakage
not ok - 4 empty properties
#
# reinit_git &&
# printf "rev <nobody, nobody@local>: %s
# " "" "" >expect &&
# cat >emptyprop.dump <<-\EOF &&
# SVN-fs-dump-format-version: 3
#
# Revision-number: 1
# Prop-content-length: 10
# Content-length: 10
#
# PROPS-END
#
# Revision-number: 2
# Prop-content-length: 10
# Content-length: 10
#
# PROPS-END
# EOF
# test-svn-fe emptyprop.dump >stream &&
# git fast-import <stream &&
# git log -p --format="rev <%an, %ae>: %s" HEAD >actual &&
# test_cmp expect actual
#
not ok - 5 author name and commit message
#
# reinit_git &&
# echo "<author@example.com,
author@example.com@local>" >expect.author &&
# cat >message <<-\EOF &&
# A concise summary of the change
#
# A detailed description of the change, why it is needed, what
# was broken and why applying this is the best course of action.
#
# * file.c
# Details pertaining to an individual file.
# EOF
# {
# properties \
# svn:author author@example.com \
# svn:log "$(cat message)" &&
# echo PROPS-END
# } >props &&
# {
# echo "SVN-fs-dump-format-version: 3" &&
# echo &&
# echo "Revision-number: 1" &&
# echo Prop-content-length: $(wc -c <props) &&
# echo Content-length: $(wc -c <props) &&
# echo &&
# cat props
# } >log.dump &&
# test-svn-fe log.dump >stream &&
# git fast-import <stream &&
# git log -p --format="%B" HEAD >actual.log &&
# git log --format="<%an, %ae>" >actual.author &&
# test_cmp message actual.log &&
# test_cmp expect.author actual.author
#
not ok - 6 unsupported properties are ignored
#
# reinit_git &&
# echo author >expect &&
# cat >extraprop.dump <<-\EOF &&
# SVN-fs-dump-format-version: 3
#
# Revision-number: 1
# Prop-content-length: 56
# Content-length: 56
#
# K 8
# nonsense
# V 1
# y
# K 10
# svn:author
# V 6
# author
# PROPS-END
# EOF
# test-svn-fe extraprop.dump >stream &&
# git fast-import <stream &&
# git log -p --format=%an HEAD >actual &&
# test_cmp expect actual
#
not ok 7 - timestamp and empty file # TODO known breakage
not ok - 8 directory with files
#
# reinit_git &&
# printf "%s
# " directory/file1 directory/file2 >expect.files &&
# echo hi >hi &&
# echo hello >hello &&
# {
# properties \
# svn:author author@example.com \
# svn:date "1999-02-01T00:01:002.000000Z" \
# svn:log "add directory with some
files in it" &&
# echo PROPS-END
# } >props &&
# {
# cat <<-EOF &&
# SVN-fs-dump-format-version: 3
#
# Revision-number: 1
# EOF
# echo Prop-content-length: $(wc -c <props) &&
# echo Content-length: $(wc -c <props) &&
# echo &&
# cat props &&
# cat <<-\EOF &&
#
# Node-path: directory
# Node-kind: dir
# Node-action: add
# Prop-content-length: 10
# Content-length: 10
#
# PROPS-END
#
# Node-path: directory/file1
# Node-kind: file
# Node-action: add
# EOF
# text_no_props hello &&
# cat <<-\EOF &&
# Node-path: directory/file2
# Node-kind: file
# Node-action: add
# EOF
# text_no_props hi
# } >directory.dump &&
# test-svn-fe directory.dump >stream &&
# git fast-import <stream &&
#
# git ls-tree -r --name-only HEAD >actual.files &&
# git checkout HEAD directory &&
# test_cmp expect.files actual.files &&
# test_cmp hello directory/file1 &&
# test_cmp hi directory/file2
#
ok 9 - node without action
ok 10 - action: add node without text
not ok 11 - change file mode but keep old content # TODO known breakage
not ok - 12 NUL in property value
#
# reinit_git &&
# echo "commit message" >expect.message &&
# {
# properties \
# unimportant "something with a NUL (Q)" \
# svn:log "commit message"&&
# echo PROPS-END
# } |
# q_to_nul >props &&
# {
# cat <<-\EOF &&
# SVN-fs-dump-format-version: 3
#
# Revision-number: 1
# EOF
# echo Prop-content-length: $(wc -c <props) &&
# echo Content-length: $(wc -c <props) &&
# echo &&
# cat props
# } >nulprop.dump &&
# test-svn-fe nulprop.dump >stream &&
# git fast-import <stream &&
# git diff-tree --always -s --format=%s HEAD >actual.message &&
# test_cmp expect.message actual.message
#
not ok - 13 NUL in log message, file content, and property name
#
# # Caveat: svnadmin 1.6.16 (r1073529) truncates at
not ok - 14 change file mode and reiterate content
#
# reinit_git &&
# cat >expect <<-\EOF &&
# OBJID
# :120000 100644 OBJID OBJID T greeting
# OBJID
# :100644 120000 OBJID OBJID T greeting
# OBJID
# :000000 100644 OBJID OBJID A greeting
# EOF
# echo "link hello" >expect.blob &&
# echo hello >hello &&
# cat >filemode.dump <<-\EOF &&
# SVN-fs-dump-format-version: 3
#
# Revision-number: 1
# Prop-content-length: 10
# Content-length: 10
#
# PROPS-END
#
# Node-path: greeting
# Node-kind: file
# Node-action: add
# Prop-content-length: 10
# Text-content-length: 11
# Content-length: 21
#
# PROPS-END
# link hello
#
# Revision-number: 2
# Prop-content-length: 10
# Content-length: 10
#
# PROPS-END
#
# Node-path: greeting
# Node-kind: file
# Node-action: change
# Prop-content-length: 33
# Text-content-length: 11
# Content-length: 44
#
# K 11
# svn:special
# V 1
# *
# PROPS-END
# link hello
#
# Revision-number: 3
# Prop-content-length: 10
# Content-length: 10
#
# PROPS-END
#
# Node-path: greeting
# Node-kind: file
# Node-action: change
# Prop-content-length: 10
# Text-content-length: 11
# Content-length: 21
#
# PROPS-END
# link hello
# EOF
# test-svn-fe filemode.dump >stream &&
# git fast-import <stream &&
# {
# git rev-list HEAD |
# git diff-tree --root --stdin |
# sed "s/$_x40/OBJID/g"
# } >actual &&
# git show HEAD:greeting >actual.blob &&
# git show HEAD^:greeting >actual.target &&
# test_cmp expect actual &&
# test_cmp expect.blob actual.blob &&
# test_cmp hello actual.target
#
ok 15 - deltas not supported
not ok - 16 property deltas supported
#
# reinit_git &&
# cat >expect <<-\EOF &&
# OBJID
# :100755 100644 OBJID OBJID M script.sh
# EOF
# {
# properties \
# svn:author author@example.com \
# svn:date "1999-03-06T00:01:002.000000Z" \
# svn:log "make an executable, or
chmod -x it" &&
# echo PROPS-END
# } >revprops &&
# {
# echo SVN-fs-dump-format-version: 3 &&
# echo &&
# echo Revision-number: 1 &&
# echo Prop-content-length: $(wc -c <revprops) &&
# echo Content-length: $(wc -c <revprops) &&
# echo &&
# cat revprops &&
# echo &&
# cat <<-\EOF &&
# Node-path: script.sh
# Node-kind: file
# Node-action: add
# Text-content-length: 0
# Prop-content-length: 39
# Content-length: 39
#
# K 14
# svn:executable
# V 4
# true
# PROPS-END
#
# EOF
# echo Revision-number: 2 &&
# echo Prop-content-length: $(wc -c <revprops) &&
# echo Content-length: $(wc -c <revprops) &&
# echo &&
# cat revprops &&
# echo &&
# cat <<-\EOF
# Node-path: script.sh
# Node-kind: file
# Node-action: change
# Prop-delta: true
# Prop-content-length: 30
# Content-length: 30
#
# D 14
# svn:executable
# PROPS-END
# EOF
# } >propdelta.dump &&
# test-svn-fe propdelta.dump >stream &&
# git fast-import <stream &&
# {
# git rev-list HEAD |
# git diff-tree --stdin |
# sed "s/$_x40/OBJID/g"
# } >actual &&
# test_cmp expect actual
#
not ok - 17 properties on /
#
# reinit_git &&
# cat <<-\EOF >expect &&
# OBJID
# OBJID
# :000000 100644 OBJID OBJID A greeting
# EOF
# sed -e "s/X$//" <<-\EOF >changeroot.dump &&
# SVN-fs-dump-format-version: 3
#
# Revision-number: 1
# Prop-content-length: 10
# Content-length: 10
#
# PROPS-END
#
# Node-path: greeting
# Node-kind: file
# Node-action: add
# Text-content-length: 0
# Prop-content-length: 10
# Content-length: 10
#
# PROPS-END
#
# Revision-number: 2
# Prop-content-length: 10
# Content-length: 10
#
# PROPS-END
#
# Node-path: X
# Node-kind: dir
# Node-action: change
# Prop-delta: true
# Prop-content-length: 43
# Content-length: 43
#
# K 10
# svn:ignore
# V 11
# build-area
#
# PROPS-END
# EOF
# test-svn-fe changeroot.dump >stream &&
# git fast-import <stream &&
# {
# git rev-list HEAD |
# git diff-tree --root --always --stdin |
# sed "s/$_x40/OBJID/g"
# } >actual &&
# test_cmp expect actual
#
not ok - 18 deltas for typechange
#
# reinit_git &&
# cat >expect <<-\EOF &&
# OBJID
# :120000 100644 OBJID OBJID T test-file
# OBJID
# :100755 120000 OBJID OBJID T test-file
# OBJID
# :000000 100755 OBJID OBJID A test-file
# EOF
# cat >deleteprop.dump <<-\EOF &&
# SVN-fs-dump-format-version: 3
#
# Revision-number: 1
# Prop-content-length: 10
# Content-length: 10
#
# PROPS-END
#
# Node-path: test-file
# Node-kind: file
# Node-action: add
# Prop-delta: true
# Prop-content-length: 35
# Text-content-length: 17
# Content-length: 52
#
# K 14
# svn:executable
# V 0
#
# PROPS-END
# link testing 123
#
# Revision-number: 2
# Prop-content-length: 10
# Content-length: 10
#
# PROPS-END
#
# Node-path: test-file
# Node-kind: file
# Node-action: change
# Prop-delta: true
# Prop-content-length: 53
# Text-content-length: 17
# Content-length: 70
#
# K 11
# svn:special
# V 1
# *
# D 14
# svn:executable
# PROPS-END
# link testing 231
#
# Revision-number: 3
# Prop-content-length: 10
# Content-length: 10
#
# PROPS-END
#
# Node-path: test-file
# Node-kind: file
# Node-action: change
# Prop-delta: true
# Prop-content-length: 27
# Text-content-length: 17
# Content-length: 44
#
# D 11
# svn:special
# PROPS-END
# link testing 321
# EOF
# test-svn-fe deleteprop.dump >stream &&
# git fast-import <stream &&
# {
# git rev-list HEAD |
# git diff-tree --root --stdin |
# sed "s/$_x40/OBJID/g"
# } >actual &&
# test_cmp expect actual
#
ok 19 - set up svn repo
not ok - 20 t9135/svn.dump
#
# git init simple-git &&
# test-svn-fe "$TEST_DIRECTORY/t9135/svn.dump" >simple.fe &&
# (
# cd simple-git &&
# git fast-import <../simple.fe
# ) &&
# (
# cd simple-svnco &&
# git init &&
# git add . &&
# git fetch ../simple-git master &&
# git diff --exit-code FETCH_HEAD
# )
#
# still have 3 known breakage(s)
# failed 11 among remaining 17 test(s)
1..20
make[2]: *** [t9010-svn-fe.sh] Error 1
make[2]: Leaving directory `/home/sunny/src/other/git/build-git/t'
make[1]: *** [test] Error 2
make[1]: Leaving directory `/home/sunny/src/other/git/build-git/t'
make: *** [test] Error 2
Also posted at https://gist.github.com/891690 in case Gmail messes up
the formatting.
Regards,
Øyvind
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 195b7ca6 breaks t9010 at current master
2011-03-29 2:08 195b7ca6 breaks t9010 at current master Øyvind A. Holm
@ 2011-03-29 4:24 ` Jonathan Nieder
2011-03-29 7:06 ` Brian Gernhardt
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Jonathan Nieder @ 2011-03-29 4:24 UTC (permalink / raw)
To: Øyvind A. Holm; +Cc: git, Junio C Hamano
Hi,
Øyvind A. Holm wrote:
> When running "make test" at current master (v1.7.4.2-406-gbe919d5),
> t9010-svn-fe.sh fails. Bisecting shows that 195b7ca6 ("vcs-svn: handle
> log message with embedded NUL") breaks the test.
Could you try with the following patch applied? It comes from
squashing the last two patches from the svn-fe branch:
* tests: make sure input to sed is newline terminated
* vcs-svn: add missing cast to printf argument
Sorry for the breakage.
---
diff --git a/t/t9010-svn-fe.sh b/t/t9010-svn-fe.sh
index 478c860..6f6175a 100755
--- a/t/t9010-svn-fe.sh
+++ b/t/t9010-svn-fe.sh
@@ -407,7 +407,7 @@ test_expect_success 'NUL in log message, file content, and property name' '
OBJID
:000000 100644 OBJID OBJID A greeting
EOF
- printf "\n%s" "something with an ASCII NUL (Q)" >expect.message &&
+ printf "\n%s\n" "something with an ASCII NUL (Q)" >expect.message &&
printf "%s\n" "helQo" >expect.hello1 &&
printf "%s\n" "link hello" >expect.hello2 &&
{
@@ -465,7 +465,11 @@ test_expect_success 'NUL in log message, file content, and property name' '
git diff-tree --root --stdin |
sed "s/$_x40/OBJID/g"
} >actual &&
- git cat-file commit HEAD | nul_to_q | sed -ne "/^\$/,\$ p" >actual.message &&
+ {
+ git cat-file commit HEAD | nul_to_q &&
+ echo
+ } |
+ sed -ne "/^\$/,\$ p" >actual.message &&
git cat-file blob HEAD^:greeting | nul_to_q >actual.hello1 &&
git cat-file blob HEAD:greeting | nul_to_q >actual.hello2 &&
test_cmp expect actual &&
diff --git a/vcs-svn/fast_export.c b/vcs-svn/fast_export.c
index 2e5bb67..99ed70b 100644
--- a/vcs-svn/fast_export.c
+++ b/vcs-svn/fast_export.c
@@ -51,7 +51,8 @@ void fast_export_commit(uint32_t revision, const char *author,
*author ? author : "nobody",
*author ? author : "nobody",
*uuid ? uuid : "local", timestamp);
- printf("data %"PRIuMAX"\n", log->len + strlen(gitsvnline));
+ printf("data %"PRIuMAX"\n",
+ (uintmax_t) (log->len + strlen(gitsvnline)));
fwrite(log->buf, log->len, 1, stdout);
printf("%s\n", gitsvnline);
if (!first_commit_done) {
--
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: 195b7ca6 breaks t9010 at current master
2011-03-29 4:24 ` Jonathan Nieder
@ 2011-03-29 7:06 ` Brian Gernhardt
2011-03-29 7:24 ` [PULL svn-fe] " Jonathan Nieder
2011-03-29 13:37 ` Øyvind A. Holm
2011-03-31 16:11 ` Brandon Casey
2 siblings, 1 reply; 7+ messages in thread
From: Brian Gernhardt @ 2011-03-29 7:06 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: Øyvind A. Holm, git, Junio C Hamano
On Mar 29, 2011, at 12:24 AM, Jonathan Nieder wrote:
> Øyvind A. Holm wrote:
>
>> When running "make test" at current master (v1.7.4.2-406-gbe919d5),
>> t9010-svn-fe.sh fails. Bisecting shows that 195b7ca6 ("vcs-svn: handle
>> log message with embedded NUL") breaks the test.
>
> Could you try with the following patch applied? It comes from
> squashing the last two patches from the svn-fe branch:
Breakage also seen on OS X 10.6.7, the provided patch does fix.
~~ Brian
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PULL svn-fe] Re: 195b7ca6 breaks t9010 at current master
2011-03-29 7:06 ` Brian Gernhardt
@ 2011-03-29 7:24 ` Jonathan Nieder
0 siblings, 0 replies; 7+ messages in thread
From: Jonathan Nieder @ 2011-03-29 7:24 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Brian Gernhardt, David Barr, Øyvind A. Holm, git
Brian Gernhardt wrote:
> Breakage also seen on OS X 10.6.7, the provided patch does fix.
Thanks. repo.or.cz doesn't seem to be accepting pushes, so
the following changes are available from
git://git.debian.org/users/jrnieder-guest/git.git svn-fe
Sorry for the trouble.
Jonathan Nieder (2):
vcs-svn: add missing cast to printf argument
tests: make sure input to sed is newline terminated
t/t9010-svn-fe.sh | 8 ++++++--
vcs-svn/fast_export.c | 3 ++-
2 files changed, 8 insertions(+), 3 deletions(-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 195b7ca6 breaks t9010 at current master
2011-03-29 4:24 ` Jonathan Nieder
2011-03-29 7:06 ` Brian Gernhardt
@ 2011-03-29 13:37 ` Øyvind A. Holm
2011-03-31 16:11 ` Brandon Casey
2 siblings, 0 replies; 7+ messages in thread
From: Øyvind A. Holm @ 2011-03-29 13:37 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: git, Junio C Hamano
On 29 March 2011 06:24, Jonathan Nieder <jrnieder@gmail.com> wrote:
> Øyvind A. Holm wrote:
> > When running "make test" at current master (v1.7.4.2-406-gbe919d5),
> > t9010-svn-fe.sh fails. Bisecting shows that 195b7ca6 ("vcs-svn:
> > handle log message with embedded NUL") breaks the test.
>
> Could you try with the following patch applied? It comes from
> squashing the last two patches from the svn-fe branch:
>
> * tests: make sure input to sed is newline terminated
> * vcs-svn: add missing cast to printf argument
Thanks a lot. Yes, that works. It seems as it's "vcs-svn: add missing
cast to printf argument" that does the trick, at least t9010 doesn't
fail after that's applied. ... And it has reached the official master
now (as 8cc299d), seems it got pushed after I went to bed. I'm running a
test on current master (07514c8) now, and things look fine so far.
Regards,
Øyvind
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 195b7ca6 breaks t9010 at current master
2011-03-29 4:24 ` Jonathan Nieder
2011-03-29 7:06 ` Brian Gernhardt
2011-03-29 13:37 ` Øyvind A. Holm
@ 2011-03-31 16:11 ` Brandon Casey
2011-03-31 21:14 ` Jonathan Nieder
2 siblings, 1 reply; 7+ messages in thread
From: Brandon Casey @ 2011-03-31 16:11 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: "Øyvind A. Holm", git
[removed Junio from cc]
On 03/28/2011 11:24 PM, Jonathan Nieder wrote:
> Hi,
>
> Øyvind A. Holm wrote:
>
>> When running "make test" at current master (v1.7.4.2-406-gbe919d5),
>> t9010-svn-fe.sh fails. Bisecting shows that 195b7ca6 ("vcs-svn: handle
>> log message with embedded NUL") breaks the test.
>
> Could you try with the following patch applied? It comes from
> squashing the last two patches from the svn-fe branch:
>
> * tests: make sure input to sed is newline terminated
> * vcs-svn: add missing cast to printf argument
>
> Sorry for the breakage.
> ---
> diff --git a/t/t9010-svn-fe.sh b/t/t9010-svn-fe.sh
> index 478c860..6f6175a 100755
> --- a/t/t9010-svn-fe.sh
> +++ b/t/t9010-svn-fe.sh
> @@ -407,7 +407,7 @@ test_expect_success 'NUL in log message, file content, and property name' '
> OBJID
> :000000 100644 OBJID OBJID A greeting
> EOF
> - printf "\n%s" "something with an ASCII NUL (Q)" >expect.message &&
> + printf "\n%s\n" "something with an ASCII NUL (Q)" >expect.message &&
> printf "%s\n" "helQo" >expect.hello1 &&
> printf "%s\n" "link hello" >expect.hello2 &&
> {
> @@ -465,7 +465,11 @@ test_expect_success 'NUL in log message, file content, and property name' '
> git diff-tree --root --stdin |
> sed "s/$_x40/OBJID/g"
> } >actual &&
> - git cat-file commit HEAD | nul_to_q | sed -ne "/^\$/,\$ p" >actual.message &&
> + {
> + git cat-file commit HEAD | nul_to_q &&
> + echo
> + } |
> + sed -ne "/^\$/,\$ p" >actual.message &&
> git cat-file blob HEAD^:greeting | nul_to_q >actual.hello1 &&
> git cat-file blob HEAD:greeting | nul_to_q >actual.hello2 &&
> test_cmp expect actual &&
I was just about to send a patch for this, when I noticed it has
already been worked around in master by the above.
I'll still share my one-liner for informational purposes which uses perl
and in my opinion is a little simpler:
diff --git a/t/t9010-svn-fe.sh b/t/t9010-svn-fe.sh
index 478c860..0dcffaa 100755
--- a/t/t9010-svn-fe.sh
+++ b/t/t9010-svn-fe.sh
@@ -465,7 +465,7 @@ test_expect_success 'NUL in log message, file content, and property name' '
git diff-tree --root --stdin |
sed "s/$_x40/OBJID/g"
} >actual &&
- git cat-file commit HEAD | nul_to_q | sed -ne "/^\$/,\$ p" >actual.message &&
+ git cat-file commit HEAD | nul_to_q | perl -ne "print if (/^$/..eof())" >actual.message &&
git cat-file blob HEAD^:greeting | nul_to_q >actual.hello1 &&
git cat-file blob HEAD:greeting | nul_to_q >actual.hello2 &&
test_cmp expect actual &&
-Brandon
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: 195b7ca6 breaks t9010 at current master
2011-03-31 16:11 ` Brandon Casey
@ 2011-03-31 21:14 ` Jonathan Nieder
0 siblings, 0 replies; 7+ messages in thread
From: Jonathan Nieder @ 2011-03-31 21:14 UTC (permalink / raw)
To: Brandon Casey; +Cc: Øyvind A. Holm, git
Hi,
Brandon Casey wrote:
> I was just about to send a patch for this, when I noticed it has
> already been worked around in master by the above.
>
> I'll still share my one-liner for informational purposes which uses perl
> and in my opinion is a little simpler:
>
> --- a/t/t9010-svn-fe.sh
> +++ b/t/t9010-svn-fe.sh
> @@ -465,7 +465,7 @@ test_expect_success 'NUL in log message, file content, and property name' '
> git diff-tree --root --stdin |
> sed "s/$_x40/OBJID/g"
> } >actual &&
> - git cat-file commit HEAD | nul_to_q | sed -ne "/^\$/,\$ p" >actual.message &&
> + git cat-file commit HEAD | nul_to_q | perl -ne "print if (/^$/..eof())" >actual.message &&
> git cat-file blob HEAD^:greeting | nul_to_q >actual.hello1 &&
> git cat-file blob HEAD:greeting | nul_to_q >actual.hello2 &&
> test_cmp expect actual &&
Thanks. I'll definitely use that idiom the next time this sed gotcha
comes up.
Also if you're interested, I'd be happy to take a patch on top to
make it so as a cleanup (probably splitting the line at the same time,
since it's getting pretty long).
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-03-31 21:14 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-29 2:08 195b7ca6 breaks t9010 at current master Øyvind A. Holm
2011-03-29 4:24 ` Jonathan Nieder
2011-03-29 7:06 ` Brian Gernhardt
2011-03-29 7:24 ` [PULL svn-fe] " Jonathan Nieder
2011-03-29 13:37 ` Øyvind A. Holm
2011-03-31 16:11 ` Brandon Casey
2011-03-31 21:14 ` Jonathan Nieder
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).