Re: [PATCH v2 2/8] auto-crlf tests: check "git checkout" exit code
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Dec 2, 2022, 06:03 UTC
- Message-ID
- <CAPig+cR2txMuv1E00TYuYJu=QU4psYi89VromYYKqHZb_7WQpQ@mail.gmail.com>
- In-Reply-To
- <20221202055905.2rqp26xu4nuknlxw@tb-raspi4>
On Fri, Dec 2, 2022 at 12:59 AM Torsten Bögershausen <tboegi@web.de> wrote:
Show 9 quoted lines
> 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.