Re: [PATCH v5 2/3] merge: replace atoi() with strtol_i() for marker size validation

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

 



On Wed, Oct 23, 2024 at 8:32 PM Taylor Blau <me@xxxxxxxxxxxx> wrote:
>
> On Wed, Oct 23, 2024 at 07:40:19AM +0000, Usman Akinyemi via GitGitGadget wrote:
> > diff --git a/t/t6406-merge-attr.sh b/t/t6406-merge-attr.sh
> > index 9bf95249347..c2a9cf03808 100755
> > --- a/t/t6406-merge-attr.sh
> > +++ b/t/t6406-merge-attr.sh
> > @@ -118,6 +118,12 @@ test_expect_success 'retry the merge with longer context' '
> >       grep "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" actual
> >  '
> >
> > +test_expect_success 'invalid conflict-marker-size 3a' '
> > +    echo "text conflict-marker-size=3a" >>.gitattributes &&
> > +    git checkout -m text 2>error &&
> > +    test_grep "warning: invalid marker-size ${SQ}3a${SQ}, expecting an integer" error
> > +'
> > +
>
> Do subsequent tests further down in this script depend on .gitattributes
> not having invalid lines? If so, you may want to instead write:
>
>     cp .gitattributes .gitattributes.bak &&
>     echo "text conflict-marker-size=3a" >>.gitattributes &&
>     test_when_finished "mv .gitattributes.bak .gitattributes" &&
>
> instead.
Thanks for the review.
Usman
>
> Thanks,
> Taylor





[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]

  Powered by Linux