Re: [PATCH 19/21] t9003: become resilient to GETTEXT_POISON

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

 



[cc:+junio]

On Thu, May 19, 2016 at 5:31 PM, Vasco Almeida <vascomalmeida@xxxxxxx> wrote:
> Às 18:34 de 19-05-2016, Eric Sunshine escreveu:
>> On Wed, May 18, 2016 at 11:27 AM, Vasco Almeida <vascomalmeida@xxxxxxx> wrote:
>>> -       sed -e "1,/^Did you mean this/d" actual | grep lgf &&
>>> +       sed -e "1,/^Did you mean this/d" actual |
>>> +       sed -e "/GETTEXT POISON/d" actual |
>>> +       grep distimdistim
>>
>> Why not do so with a single sed invocation?
>>
>>    sed -e "..." -e "..." |
>
> I tried but it seems not to work.
>
> Actually I did this wrong, I haven't thought this through.
>
> Under gettext poison:
> sed -e "1,/^Did you mean this/d" removes all lines, gives no output.
> And then the one second, sed -e "/GETTEXT POISON/d", outputs "lgf" as
> expected.
>
> But running normally (without gettext poison):
> 1st sed outputs "lgf" as expected
> And then second one output the entire 'actual' file, like if it were
> cat, undoing the first sed.
>
> I think the sed here is superfluous in the first place.
> Should we remove it? If it weren't the case of gettext poison it was ok
> to have sed there, but it makes the test fail under gettext poison.

Indeed, the sed seems superfluous. The output of the test command is:

    git: 'lfg' is not a git command. See 'git --help'.

    Did you mean this?
        lgf

And, the grep'd string, "lgf" only appears once, so grep alone should
be sufficient to verify expected behavior. Likewise for the other case
of misspelled "distimdist" and grep'd "distimdistim" which appears
only once.

I agree that the simplest fix to make GETTEXT_POISON work is to drop
the sed invocation.

Anyhow, I've cc:'d the author of 9d1d2b7 (git: remove an early return
from save_env_before_alias(), 2016-01-26) which introduced it.
--
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]