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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]