Re: [PATCH/RFC 7/7] t2016 (checkout -p): use printf for multiline y/n input
- From
Thomas Rast <trast@student.ethz.ch>
- Date
- Sep 7, 2010, 08:06 UTC
- Message-ID
- <201009071006.27607.trast@student.ethz.ch>
- In-Reply-To
- <20100907015509.GH1182@burratino>
Jonathan Nieder wrote:
Show 10 quoted lines
> Instead of > > (echo y; echo n; echo n) | git checkout -p HEAD^ -- dir > > write > > printf "%s\n" y n n | > git checkout -p HEAD^ -- dir > > which means the same thing but might be easier to read.
I'm indifferent about this. It does save a process, but (maybe that's just me though) I had to look up a POSIX manpage to verify that the repeating behaviour is guaranteed.
> While at it, add a missing && to the "git checkout -p HEAD with change > already staged" test.
Good catch.
--
Thomas Rast
trast@{inf,student}.ethz.ch