Re: [RFC/PATCH 4/4] t/t8006: test textconv support for blame

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le 3 juin 2010 17:44, Johannes Sixt <j6t@xxxxxxxx> a écrit :
> On Donnerstag, 3. Juni 2010, Axel Bonnet wrote:
>> +cat >helper <<'EOF'
>> +#!/bin/sh
>> +sed 's/^/converted: /' "$@" >helper.out
>> +cat helper.out
>> +EOF
>
> You don't need an intermediate file here, do you? Without it, this textconv
> script is a one-liner; now, isn't it possible to configure a shell command as
> textconv command, i.e., without this helper script?
>

Ok. We don't use the intermediate file anymore. Actually, we used what
has been done for textconv test for diff.
I didn't find a way to directly specify the sed command as textconv
command without using ./helper though.

cat >helper <<'EOF'
#!/bin/sh
sed 's/^/converted: /' "$@"
EOF
chmod +x helper

>> +test_expect_success 'setup ' '
>> +     echo test 1 >one.bin &&
>> +     echo test number 2 >two.bin &&
>> +     ln one.bin link.bin &&
>
> Do you need a hard link? Can't you just copy the file at the right time?
>

At first, we wanted to test how links handle textconv but it behaves
as regular file so the test is not really relevant. It will be
deleted.

>> +test_expect_success 'blame with --no-textconv' '
>> +     git blame --no-textconv one.bin | grep Number2 >blame
>> +     find_blame <blame >result
>
> It would be nice if you could write this like, e.g.,
>
>        git blame --no-textconv one.bin >blame &&
>        find_blame Number2 <blame >result
>
> so that the git command is not part of a pipeline (otherwise, unexpected exit
> codes would go undetected).
>
> Please look for missing '&&', you forgot it in many places.
>

We did the appropriate changes.
Thanks a lot for your comments!

Diane

> -- Hannes
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]