From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-3.4 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [IPv6:2604:1380:40f1:3f00::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 5E78A1F44D for ; Thu, 28 Mar 2024 21:19:47 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=manjaro.org header.i=@manjaro.org header.a=rsa-sha256 header.s=2021 header.b=xGjM4wVx; dkim-atps=neutral Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 64010B2426A for ; Thu, 28 Mar 2024 21:19:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5061013A414; Thu, 28 Mar 2024 21:19:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=manjaro.org header.i=@manjaro.org header.b="xGjM4wVx" Received: from mail.manjaro.org (mail.manjaro.org [116.203.91.91]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7B9AB2BAE7 for ; Thu, 28 Mar 2024 21:19:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=116.203.91.91 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711660776; cv=none; b=AjruYfx7VUkI71mmmVhMSumypIpmOWjROlDrVHMbqx4suPpoYAQEJ4lZKDN02OJPk8ZlzxDxT3V26sU5CzJ9yegk1rKjPmHjwo/3EPhQlRLEdpIWhmitdLDg58nb982M6Rujq2cWlrUl8D8NWEFHVlblS3qhWIyqA5Jir3/uq/Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711660776; c=relaxed/simple; bh=ea37D0qmwoxxG9oxfK94VhlZJODKicLBlaLKYL0WDyw=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type; b=I0AooWxE3U2QdUROqG/sw92Ju4i5D3eGDZ+4Toejyhm/iWNy0e0MV2cb4H4mDhYfcLpxyNCD8duhQZMP0aI2ZxXP0Kh37MRC2OptdHySIULc7KT71hiyKERKbvgy3jE6pBMKj1hHKfPJ+sWZGM2NYlFEb20TtP00NIqa3rIIczw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=manjaro.org; spf=pass smtp.mailfrom=manjaro.org; dkim=pass (2048-bit key) header.d=manjaro.org header.i=@manjaro.org header.b=xGjM4wVx; arc=none smtp.client-ip=116.203.91.91 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=manjaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=manjaro.org Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=manjaro.org; s=2021; t=1711660766; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YC7Zk247u6w+GiiS8eaygJ2kAnHp6tShcopMIEdg2nU=; b=xGjM4wVx6Uy2NWBmphXiL/rX1ShY1WUATyRtjSUnbG/ux3AlW4klQ/jiZs3mqINBsWH3WA zhegGKJ0hYcKjIs03+FzzLnJvu2BlBDPgdyUHfIahWw92PipfDfw8yKahaEo8rxFfhwcV1 RqSMaljNMr+FUwpkEeTR9iV6e8qxL4A9nNbx+MJ7ZCGKZOD+3ekaQ7nl30cbY+01wnrQAb FNQ2//EqjyfLf89gb4tQyQdDcoer2Gc+/FQiO70B7/6T+8GqvX1eef2y8Lx08ulqfZMUIc vJSsyKdxj68x2gWAIh2DmlSKUFrZNiehynjtoqu0eOGZEl08ANyoI9ofLRG71g== Date: Thu, 28 Mar 2024 22:19:24 +0100 From: Dragan Simic To: Junio C Hamano Cc: Eugenio Bargiacchi , git@vger.kernel.org Subject: Re: Better visual separation of hunks in `git add -p` In-Reply-To: References: <1b81a013dd0faccdc24fe018fd740755@manjaro.org> <26f8d21dfd53d699804485b0f8c6abe1@manjaro.org> Message-ID: X-Sender: dsimic@manjaro.org Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Authentication-Results: ORIGINATING; auth=pass smtp.auth=dsimic@manjaro.org smtp.mailfrom=dsimic@manjaro.org On 2024-03-28 21:43, Junio C Hamano wrote: > Dragan Simic writes: > >> Of course, users could pick the right escape sequences for their >> terminals, but as you already noted, the same configurations could >> end up being used on different terminals. For example, even SSHing >> into a machine using a different SSH client could lead to a mess. > > There is a separate discussion of conditional configuration based on > environment variable settings, e.g. > > [includeIf "env:TERM:vt100"] > path = ~/.git-config-bits/vt100 > > where the named file might have > > [prompt] prefix = "\033[H\033[J" > > so it is certainly doable. > > It is a different story if doing so is sensible, of course. Quite frankly, I think that would be like opening a can of worms. In other words, if we end up implementing support for the "add -P" prefix, allowing the users to do whatever they want with the prefixes would surely be fine, but only if we implement "add -P" at the same time, to already provide a reliable and simple way for clearing the screen.