From: Junio C Hamano Date: Fri, 15 Feb 2008 17:31:10 GMT Subject: Re: [PATCH] hash-object: cleanup handling of command line options Message-ID: <7vskzugm8x.fsf@gitster.siamese.dyndns.org> In-Reply-To: <20080214201355.6021.qmail@6a68c4de06516f.315fe32.mid.smarden.org> Gerrit Pape writes: > This regresses the use case of running: > > $ git hash-object --stdin Makefile > to obtain hash values for cache.h and then Makefile. It used to > report the object names in order, but now it always processes > --stdin at the end. Isn't this change of behaviour more serious than the made up "--stdin --stdin" example? The made-up insane usage is rejected with your patch now, so it would be fine, but that is so insane that we probably even did not need to explicitly reject. On the other hand, running "--stdin file2 file0 && - obname0=$(git hash-object file0) && - obname1=$(echo bar | git hash-object --stdin) && + obname0=$(echo bar | git hash-object --stdin) && + obname1=$(git hash-object file0) && obname0new=$(echo bar | git hash-object --stdin file0 | sed -n -e 1p) && obname1new=$(echo bar | git hash-object --stdin file0 | sed -n -e 2p) && test "$obname0" = "$obname0new" &&