# t0211-trace2-perf.sh: typo patern -> pattern

4 messages from 2024-05-15 to 2024-05-15. Participants: Marcel Telka, Junio C Hamano, Jeff Hostetler.
Thread: https://gitlist.dev/t/61480

## Marcel Telka, 2024-05-15 14:35

Subject: t0211-trace2-perf.sh: typo patern -> pattern
Message-ID: <ZkTIPlTS4jcQ-rHX@telcontar>
URL: https://gitlist.dev/e/ZkTIPlTS4jcQ-rHX%40telcontar

```
Hi,

There seems to be apparent typo in the t/t0211-trace2-perf.sh file:


--- a/t/t0211-trace2-perf.sh
+++ b/t/t0211-trace2-perf.sh
@@ -233,7 +233,7 @@ have_counter_event () {
 
        pattern="d0|${thread}|${event}||||${category}|name:${name} value:${value}" &&
 
-       grep "${patern}" ${file}
+       grep "${pattern}" ${file}
 }
 
 test_expect_success 'global counter test/test1' '


Thanks.

-- 
+-------------------------------------------+
| Marcel Telka   e-mail:   marcel@telka.sk  |
|                homepage: http://telka.sk/ |
+-------------------------------------------+

```

## Junio C Hamano, 2024-05-15 16:52

Subject: Re: t0211-trace2-perf.sh: typo patern -> pattern
Message-ID: <xmqqjzjvxbk0.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqqjzjvxbk0.fsf%40gitster.g
In-Reply-To: <ZkTIPlTS4jcQ-rHX@telcontar>

```
Marcel Telka <marcel@telka.sk> writes:

> Hi,
>
> There seems to be apparent typo in the t/t0211-trace2-perf.sh file:
>
>
> --- a/t/t0211-trace2-perf.sh
> +++ b/t/t0211-trace2-perf.sh
> @@ -233,7 +233,7 @@ have_counter_event () {
>  
>         pattern="d0|${thread}|${event}||||${category}|name:${name} value:${value}" &&
>  
> -       grep "${patern}" ${file}
> +       grep "${pattern}" ${file}
>  }
>  
>  test_expect_success 'global counter test/test1' '

Ah, indeed, there is no assignment to the variable $patern so this
grep matches by looking for all the empty strings in the file X-<.


```

## Jeff Hostetler, 2024-05-15 16:59

Subject: Re: t0211-trace2-perf.sh: typo patern -> pattern
Message-ID: <fe76b111-f080-5d1f-c51f-591e9381c116@jeffhostetler.com>
URL: https://gitlist.dev/e/fe76b111-f080-5d1f-c51f-591e9381c116%40jeffhostetler.com
In-Reply-To: <xmqqjzjvxbk0.fsf@gitster.g>

```


On 5/15/24 12:52 PM, Junio C Hamano wrote:
> Marcel Telka <marcel@telka.sk> writes:
> 
>> Hi,
>>
>> There seems to be apparent typo in the t/t0211-trace2-perf.sh file:
>>
>>
>> --- a/t/t0211-trace2-perf.sh
>> +++ b/t/t0211-trace2-perf.sh
>> @@ -233,7 +233,7 @@ have_counter_event () {
>>   
>>          pattern="d0|${thread}|${event}||||${category}|name:${name} value:${value}" &&
>>   
>> -       grep "${patern}" ${file}
>> +       grep "${pattern}" ${file}
>>   }
>>   
>>   test_expect_success 'global counter test/test1' '
> 
> Ah, indeed, there is no assignment to the variable $patern so this
> grep matches by looking for all the empty strings in the file X-<.
> 
> 

OOPS.

Thanks for the fix.
Jeff

```

## Junio C Hamano, 2024-05-15 17:09

Subject: Re: t0211-trace2-perf.sh: typo patern -> pattern
Message-ID: <xmqqr0e3vw6d.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqqr0e3vw6d.fsf%40gitster.g
In-Reply-To: <fe76b111-f080-5d1f-c51f-591e9381c116@jeffhostetler.com>

```
Jeff Hostetler <git@jeffhostetler.com> writes:

> On 5/15/24 12:52 PM, Junio C Hamano wrote:
>> Marcel Telka <marcel@telka.sk> writes:
>> 
>>> Hi,
>>>
>>> There seems to be apparent typo in the t/t0211-trace2-perf.sh file:
>>>
>>>
>>> --- a/t/t0211-trace2-perf.sh
>>> +++ b/t/t0211-trace2-perf.sh
>>> @@ -233,7 +233,7 @@ have_counter_event () {
>>>            pattern="d0|${thread}|${event}||||${category}|name:${name}
>>> value:${value}" &&
>>>   -       grep "${patern}" ${file}
>>> +       grep "${pattern}" ${file}
>>>   }
>>>     test_expect_success 'global counter test/test1' '
>> Ah, indeed, there is no assignment to the variable $patern so this
>> grep matches by looking for all the empty strings in the file X-<.
>> 
>
> OOPS.
>
> Thanks for the fix.

Nobody sent an applicable patch yet, though ;-)

```
