From: Thomas Rast Date: Tue, 07 Sep 2010 08:06:27 GMT Subject: Re: [PATCH/RFC 7/7] t2016 (checkout -p): use printf for multiline y/n input Message-ID: <201009071006.27607.trast@student.ethz.ch> In-Reply-To: <20100907015509.GH1182@burratino> Jonathan Nieder wrote: > 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