From mboxrd@z Thu Jan 1 00:00:00 1970 From: Junio C Hamano Subject: Re: [PATCH] hash-object: cleanup handling of command line options Date: Fri, 15 Feb 2008 09:31:10 -0800 Message-ID: <7vskzugm8x.fsf@gitster.siamese.dyndns.org> References: <20080213190338.7393.qmail@d70c5cbe18d4bd.315fe32.mid.smarden.org> <7v7ih8pre6.fsf@gitster.siamese.dyndns.org> <20080213224941.18121.qmail@c0fdbb95c1b5f1.315fe32.mid.smarden.org> <7v8x1oo2w8.fsf@gitster.siamese.dyndns.org> <20080214201355.6021.qmail@6a68c4de06516f.315fe32.mid.smarden.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: git@vger.kernel.org To: Gerrit Pape X-From: git-owner@vger.kernel.org Fri Feb 15 18:32:30 2008 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1JQ4QH-0007v5-8p for gcvg-git-2@gmane.org; Fri, 15 Feb 2008 18:32:29 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753113AbYBORbx (ORCPT ); Fri, 15 Feb 2008 12:31:53 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753978AbYBORbx (ORCPT ); Fri, 15 Feb 2008 12:31:53 -0500 Received: from a-sasl-quonix.sasl.smtp.pobox.com ([208.72.237.25]:32801 "EHLO sasl.smtp.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752889AbYBORbw (ORCPT ); Fri, 15 Feb 2008 12:31:52 -0500 Received: from a-sasl-quonix.pobox.com (localhost [127.0.0.1]) by a-sasl-quonix.pobox.com (Postfix) with ESMTP id 925E430AB; Fri, 15 Feb 2008 12:31:50 -0500 (EST) Received: from pobox.com (ip68-225-240-77.oc.oc.cox.net [68.225.240.77]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-sasl-quonix.pobox.com (Postfix) with ESMTP id A233530AA; Fri, 15 Feb 2008 12:31:46 -0500 (EST) User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: 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" &&