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,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 276941F5AE for ; Mon, 27 Jul 2020 20:11:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728903AbgG0UL1 (ORCPT ); Mon, 27 Jul 2020 16:11:27 -0400 Received: from pb-smtp2.pobox.com ([64.147.108.71]:53476 "EHLO pb-smtp2.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726451AbgG0UL0 (ORCPT ); Mon, 27 Jul 2020 16:11:26 -0400 Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 88926790F7; Mon, 27 Jul 2020 16:11:24 -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=lnAbfIHV+AuqT+Ya9tby6Z5kD0o=; b=YxGAS8 gG8KZn72w05CKdsNei+aLbAug48Vi2DGgE/1Q6JuIYS6j2v2M8QoVkACBXUxfAw8 0Atew4+I22f6NiyaNzVLys8y5WUuZKyXqYy3wsFCGuj3l0E9430Ojp+AzutmZvYO z+xgUDW8tVBXTEhpYTA4afEVuldeb1Cg8Sebc= 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=ao8Ue8RtApLHIeuOAQkVIvzl2ptAVD1W RQVkhj/QEeektRMMOLrVfKonS3atIdLiHZ6sDMeamOR1QAVgDAuOGhpvMgGpEfFw iHlxKNgHz88SAcFdGrTlfjRJOFycA1bMeEvU0DxqtGAcqo75j6Xqr8fn3mjNGbnh T8xM/RM8ATs= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 7F15F790F6; Mon, 27 Jul 2020 16:11:24 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [35.196.173.25]) (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 0968D790F5; Mon, 27 Jul 2020 16:11:24 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Christian Couder Cc: git , Anders Waldenborg , Jeff King , Jonathan Tan Subject: Re: Questions about trailer configuration semantics References: <87blk0rjob.fsf@0x63.nu> Date: Mon, 27 Jul 2020 13:11:23 -0700 In-Reply-To: (Christian Couder's message of "Mon, 27 Jul 2020 20:37:26 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 58469E70-D045-11EA-9A1D-2F5D23BA3BAF-77302942!pb-smtp2.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Christian Couder writes: >> > $ printf '\naCKed: Zz\n' | \ >> > git -c 'trailer.Acked.key=Acked' interpret-trailers --parse >> > will emit: "Acked: Zz" > > Yeah, I think that's nice, as it can make sure that the key appears in > the same way. It's true that it would be better if it would be > documented. > >> > but only if "key" is used, other config options doesn't cause it to be >> > normalized. >> > E.g: >> > $ printf '\naCKed: Zz\n' | \ >> > git -c 'trailer.Acked.ifmissing=doNothing' interpret-trailers --parse >> > will emit: "aCKed: Zz" (still lowercase a and uppercase CK) > > Yeah, in this case we are not sure if "Acked" or "aCKed" is the right > way to spell it. OK, so in short, the trailer subsystem matches the second level of the configuration variable name (e.g. "Acked") in a case insensitive way, and it does *not* normalize the case in the output. The .key request is a mechanism to replace the matched key with the specified string, so there is *NO* case normalization in what Anders observed. In other words, $ printf '\naCKed: Zz\n' | \ git -c 'trailer.Acked.key=Rejected' interpret-trailers --parse would have emitted "Rejected: Zz".