From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Walton Subject: Re: [PATCH] Avoid difference in tr semantics between System V and BSD Date: Mon, 28 Oct 2013 21:12:10 +0000 Message-ID: References: <1382951633-6456-1-git-send-email-bdwalton@gmail.com> <526EA7C8.2020607@kdbg.org> <20131028182718.GA4242@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Cc: Jonathan Nieder , Johannes Sixt , git , =?ISO-8859-1?Q?=C6var_Arnfj=F6r=F0?= To: Junio C Hamano X-From: git-owner@vger.kernel.org Mon Oct 28 22:12:16 2013 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Vau6h-0005Qs-H5 for gcvg-git-2@plane.gmane.org; Mon, 28 Oct 2013 22:12:15 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756148Ab3J1VMM (ORCPT ); Mon, 28 Oct 2013 17:12:12 -0400 Received: from mail-qe0-f50.google.com ([209.85.128.50]:57329 "EHLO mail-qe0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751042Ab3J1VML (ORCPT ); Mon, 28 Oct 2013 17:12:11 -0400 Received: by mail-qe0-f50.google.com with SMTP id 1so4411913qee.9 for ; Mon, 28 Oct 2013 14:12:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ByQvDtrzdVyNu7LPizuA5b4LFao4Ii1CYRSDZlXPuVM=; b=pjYd3ksmn41vG49blUFaCyuWYpdfFIyFnefRSAAnpKtZARr186ie3P2W7+Sk0hfiYY C8aK77ibxu3DmoWz2Z8PpVo/Lr3Ej+I+Ix7J994UKcfeeoyd4cG7MGjarSZsdwYMs9eF vdTGVgsIZx6HxjVPrKB5G8xZZ60sEljrc+qkWjPEDkjZolLiV8uvQTztXuKhGe4B88JK EzOCWmMp8NdKc4roq4ti0MKGIjaW2qfhqi5hpBelqDEBWfJMvz2UOEMLNfO9A7kPVDiB 9iukvCCoJQorKV/e7rJ9owuLJ8kTJkjdrK43B1FjAJ88Je8Cl0JVZoZCHyAp89GI/1G/ MKwQ== X-Received: by 10.229.109.193 with SMTP id k1mr31967895qcp.9.1382994730563; Mon, 28 Oct 2013 14:12:10 -0700 (PDT) Received: by 10.224.189.12 with HTTP; Mon, 28 Oct 2013 14:12:10 -0700 (PDT) In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Mon, Oct 28, 2013 at 9:04 PM, Ben Walton wrote: > I'm happy to defer to your judgement on this - If you'd like the tests > wrapped, I'll do so. > > Thanks > -Ben > > On Mon, Oct 28, 2013 at 7:08 PM, Junio C Hamano wrote: >> Jonathan Nieder writes: >> >>> Johannes Sixt wrote: >>> >>>> In other tests, we check for prerequisite PERL, i.e., we are prepared >>>> that perl is not available. Shouldn't we do that here, too? >>> >>> I think the tests assume there's a perl present even when the PERL >>> prereq isn't present already. E.g.: >>> >>> nul_to_q () { >>> "$PERL_PATH" -pe 'y/\000/Q/' >>> } >>> >>> So in practice the PERL prereq just means "NO_PERL wasn't set", or >>> in other words, "commands that use perl work". Maybe something >>> like the following would help? >>> >>> Signed-off-by: Jonathan Nieder >>> >>> diff --git i/t/README w/t/README >>> index 2167125..54cd064 100644 >>> --- i/t/README >>> +++ w/t/README >>> @@ -629,11 +629,20 @@ See the prereq argument to the test_* functions in the "Test harness >>> library" section above and the "test_have_prereq" function for how to >>> use these, and "test_set_prereq" for how to define your own. >>> >>> - - PERL & PYTHON >>> + - PYTHON >>> >>> - Git wasn't compiled with NO_PERL=YesPlease or >>> - NO_PYTHON=YesPlease. Wrap any tests that need Perl or Python in >>> - these. >>> + Git wasn't compiled with NO_PYTHON=YesPlease. Wrap any tests that >>> + need Python with this. >>> + >>> + - PERL >>> + >>> + Git wasn't compiled with NO_PERL=YesPlease. >>> + >>> + Even without the PERL prerequisite, tests can assume there is a >>> + usable perl interpreter at $PERL_PATH, though it need not be >>> + particularly modern. >>> + >>> + Wrap tests for commands implemented in Perl with this. >> >> Sounds like a sensible thing to address, but I first parsed it as >> >> Wrap (tests for (commands implemented in Perl)) with this. >> >> while I think the readers are expected to parse it as >> >> Wrap ((tests for commands) implemented in Perl) with this. >> Per the other discussion about replacing all PERL_PATH with a shell function named perl, should I update this patch to use $PERL_PATH in the meantime so that it can be batch updated when the function is added in a separate patch? Thanks -Ben -- --------------------------------------------------------------------------------------------------------------------------- Take the risk of thinking for yourself. Much more happiness, truth, beauty and wisdom will come to you that way. -Christopher Hitchens ---------------------------------------------------------------------------------------------------------------------------