Re: [PATCH v2 2/8] auto-crlf tests: check "git checkout" exit code

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

 



On Fri, Dec 2, 2022 at 12:59 AM Torsten Bögershausen <tboegi@xxxxxx> wrote:
> On Fri, Dec 02, 2022 at 02:02:55AM +0100, René Scharfe wrote:
> > Side note: The checkout commands only differ in their -c parameter.
> > They could be unified like this, which might simplify handling their
> > return code:
> >
> >       git ${ceol:+-c core.eol=$ceol} checkout -- crlf_false_attr__$f.txt
>
> That is a nice one. (I learned about the ${:+} yesterday).
> Is it supported by all the shells/os combinations ?

${:+} is well supported. It's POSIX. It's used heavily in the Git test
suite already. So, it's safe to use.



[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