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: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-3.9 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_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_CSS,URIBL_CSS_A shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id 058FD1F4D7 for ; Fri, 3 Jun 2022 20:50:17 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=pobox.com header.i=@pobox.com header.b="FDxcrX6Z"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242796AbiFCUuL (ORCPT ); Fri, 3 Jun 2022 16:50:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231449AbiFCUuK (ORCPT ); Fri, 3 Jun 2022 16:50:10 -0400 Received: from pb-smtp21.pobox.com (pb-smtp21.pobox.com [173.228.157.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C90E326D4 for ; Fri, 3 Jun 2022 13:50:07 -0700 (PDT) Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id EF98B19A059; Fri, 3 Jun 2022 16:50:06 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=ZUtHEzET2L2cdXCinAifdD49h+lCiz088f/Zti 1g9vc=; b=FDxcrX6ZxUMIiF0flLIqVzMqmHkx0PkZs3kulEgB391ySOC8Dhfo3t 0JQJdQy8bWoE1/ADk7f4xs0dvsSwVwNNVrEag/kgYDiZwlD4x/hJs6kAn+WCBPmA b/gRoaoHKzQwF1C6baflPvrulsnag9Yt4rFtzriBSFmyOZJ48810c= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id E810F19A058; Fri, 3 Jun 2022 16:50:06 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.83.92.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id 6947F19A053; Fri, 3 Jun 2022 16:50:02 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Joakim Petersen Cc: git@vger.kernel.org, =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason , Justin Donnelly Subject: Re: [PATCH v3] git-prompt: make colourization consistent References: <20220602145935.10512-1-joak-pet@online.no> <20220603142521.42863-1-joak-pet@online.no> <7d391d82-b15e-4a31-5207-c4037fec0bf9@online.no> Date: Fri, 03 Jun 2022 13:50:01 -0700 In-Reply-To: <7d391d82-b15e-4a31-5207-c4037fec0bf9@online.no> (Joakim Petersen's message of "Fri, 3 Jun 2022 19:23:25 +0200") 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: BD63FAD4-E37E-11EC-8B9C-CBA7845BAAA9-77302942!pb-smtp21.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Joakim Petersen writes: > That does seem like a much better idea for maintainability, I can > change the patch to do this instead. I have one question, though: the > sequence $c$b (bare state and branch name) is a special case, where > they're intended to have the same colour, should I wrap both in colour > set, colour clear, or only clear after $b? If we want to allow $c and $b appear in different places (which I have no opinion on), I would say we should just color them independently and fix the test that expects the close linkage between the two. I offhand see no reason that they _must_ stay together myself, though. Thanks.