Re: [PATCHv2 1/2] t5520-pull: Add testcases showing spurious conflicts from git pull --rebase

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

 



On Sun, Aug 8, 2010 at 20:17, Elijah Newren <newren@xxxxxxxxx> wrote:
> Hi,
>
> Thanks for taking a look!
>
> On Sun, Aug 8, 2010 at 2:01 PM, Ævar Arnfjörð Bjarmason
> <avarab@xxxxxxxxx> wrote:
>> On Sun, Aug 8, 2010 at 19:04, Elijah Newren <newren@xxxxxxxxx> wrote:
> <snip>
>>> +        perl -pi -e s/5/43/ stuff &&
>>> +        git commit -a -m "5->43" &&
>>> +        perl -pi -e s/6/42/ stuff &&
>>
>> Please use sed so the test doesn't depend on perl being present.
>
> The original series used 'sed -i', but I found out that is apparently
> not portable.  Should I use sed + a temporary file + mv?

Yeah, a few tests do that already. E.g.:

    sed s/6/42/ <stuff >stuff.tmp &&
    mv stuff.tmp stuff

You could also just declare a dependency on perl:

    test_expect_success PERL 'setup for detecting upstreamed changes' '

But then you'd also have to use "$PERL_PATH" instead of just perl, see
t9700-perl-git.sh.
--
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]