From: Junio C Hamano Date: Sun, 27 Apr 2008 06:21:26 GMT Subject: Re: [PATCH] rev-parse: fix --verify to error out when passed junk after a good rev Message-ID: <7v63u3izrt.fsf@gitster.siamese.dyndns.org> In-Reply-To: <20080426151929.819ced3e.chriscool@tuxfamily.org> Christian Couder writes: > Before this patch something like: > > $ git rev-parse --verify > > worked whatever junk was as long as could be parsed > correctly. > > This patch makes "git rev-parse --verify" error out when passed > any junk after a good rev. > > Signed-off-by: Christian Couder > --- > builtin-rev-parse.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > With this patch something like: > > $ git rev-parse --verify > > will still fail. I think this should fail. I've long thought that ideally giving anything but a single good rev to "rev-parse --verify" should fail before spitting anything out. This, like other reponses to errorneous inputs, were what we considered of lower priority in early days of git (think "before the end of 2005"), because we had many other "better and more urgent" things to worry about. I think we have long passed that stage.