From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 8AB901F66E for ; Wed, 12 Aug 2020 17:10:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726456AbgHLRKk (ORCPT ); Wed, 12 Aug 2020 13:10:40 -0400 Received: from cloud.peff.net ([104.130.231.41]:56688 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725872AbgHLRKj (ORCPT ); Wed, 12 Aug 2020 13:10:39 -0400 Received: (qmail 10527 invoked by uid 109); 12 Aug 2020 17:10:39 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Wed, 12 Aug 2020 17:10:39 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 953 invoked by uid 111); 12 Aug 2020 17:10:38 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Wed, 12 Aug 2020 13:10:38 -0400 Authentication-Results: peff.net; auth=none Date: Wed, 12 Aug 2020 13:10:38 -0400 From: Jeff King To: Eric Sunshine Cc: Taylor Blau , Git List , Elijah Newren , Junio C Hamano , Shourya Shukla Subject: Re: [PATCH v2] test_cmp: diagnose incorrect arguments Message-ID: <20200812171038.GB43566@coredump.intra.peff.net> References: <20200809060810.31370-1-sunshine@sunshineco.com> <20200809174209.15466-1-sunshine@sunshineco.com> <20200811183258.GB33865@syl.lan> <20200812153705.GC33189@coredump.intra.peff.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Wed, Aug 12, 2020 at 12:39:14PM -0400, Eric Sunshine wrote: > On Wed, Aug 12, 2020 at 12:15 PM Eric Sunshine wrote: > > On Wed, Aug 12, 2020 at 11:37 AM Jeff King wrote: > > > I don't think this is an error. The program can tell which you meant by > > > the number of arguments. POSIX lays out some rules here (from "man > > > 1posix test" on my system, but I'm sure you can find it online): > > > > I intentionally didn't focus on or mention POSIX in my response > > because I wanted to represent the Real World reason why "x$var" is > > such a common idiom. [...] > > I probably should have done a better job in my original response to > Taylor to make it clear that I was talking about Real World (even if > old) rather than POSIX. Yeah. I guess I'm questioning how current that Real World view is. It hasn't bitten us yet, though we do seem to do the "x" thing in some places. And most of our shell code is in the test suite, which sees pretty tame filenames. -Peff