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-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,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 B874E1F4B4 for ; Mon, 12 Apr 2021 21:27:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238229AbhDLV1k (ORCPT ); Mon, 12 Apr 2021 17:27:40 -0400 Received: from pb-smtp2.pobox.com ([64.147.108.71]:57718 "EHLO pb-smtp2.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231854AbhDLV1j (ORCPT ); Mon, 12 Apr 2021 17:27:39 -0400 Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 53BF5C73B5; Mon, 12 Apr 2021 17:27:20 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=90ISAKfhNXqIKnPOKy4+QyCLqok=; b=SLh5Ko vkPQeprbwEjvnSwE65KG9EhKL44M3TK/rlmPVnuVM+7cTd3rc/ggH51BR4KXI0CZ 5AECMvFo1/TAfPUqvC/+1oToHuRbCEDuGujyMs/I1bwqqwCtnSHdU3bz4exBBy6p ABWxpG5T45Lou2Vt7B2vNPkrcfvcOr9z7OVno= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=qp2OqAKcz06jBgwBQkd/dW760J29iFtD hxeM4r1MdFGDUd+Zkox46Mg0zPJs0H3TITuU/eGg/n6YOgoEPTW4eYnn+FSgLRIo mmTTbmpNo6RT8HvTN44weMO/aeuJ1oekXsSDjaeFwNvm2yEuveuEWHwu6nY/Tetb mF8XLX/BVl4= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 454ADC73B4; Mon, 12 Apr 2021 17:27:20 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.74.119.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id 85FFEC73B2; Mon, 12 Apr 2021 17:27:19 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Eric Sunshine Cc: =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason , Git List , Jeff King , Matthieu Moy , Johannes Schindelin Subject: Re: [PATCH 08/16] test-lib functions: add --printf option to test_commit References: Date: Mon, 12 Apr 2021 14:27:18 -0700 In-Reply-To: (Eric Sunshine's message of "Mon, 12 Apr 2021 15:05:56 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: DC906268-9BD5-11EB-9939-74DE23BA3BAF-77302942!pb-smtp2.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Eric Sunshine writes: > The name "printf" has such strong association in programmer's minds > with "%" and argument consumption that the name of this option alone > almost begs people to take advantage of argument interpolation even > though it's documented here as not allowing it. Taking into > consideration that people often do not read documentation, `--printf` > as the name of the option may be an unfortunate one. Perhaps it could > be called `--raw` or something less likely to suggest argument > interpolation. The reason we want to use 'printf' instead of 'echo' is because only some implementations of 'echo' honors '\t\n\r' etc., and 'echo' by others show these literally. Using printf(1) allows us to write these backslashed special characters universally. So, I find 'raw' equally confusing, if not more. >> @@ -192,6 +196,7 @@ debug () { >> >> test_commit () { >> notick= && >> + echo=echo && > > This could be slightly confusing. I wonder if naming this variable > `emit` would be clearer. Perhaps.