Re: [PATCH v2 1/3] t: fix quotes tests for --pathspec-from-file
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Dec 31, 2019, 00:26 UTC
- Message-ID
- <20191231002607.GC13606@google.com>
- In-Reply-To
- <CAPig+cSSqAxuHYg9DxuJzC7m2HAt8F2YPNxT0x5+SksCGic4MA@mail.gmail.com>
Eric Sunshine wrote:
> But is the "no newline" bit indeed intentional? If not, then a simple > echo would be even easier (though with a bit more escaping): > > echo "\"file\101.t\"" | git checkout --pathspec-from-file=- HEAD^1 &&
For portability, that would be
printf "%s\n" "\"file\101.t\"" | ...
because some implementations of echo interpret escapes by default.
Thanks, Jonathan