Subject: Re: [PATCH/RFC 7/7] t2016 (checkout -p): use printf for multiline y/n input

From: Thomas Rast <[email-masked]>
Date: Tue, 7 Sep 2010 10:06:27 +0200

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