From: Dragan Simic <dsimic@manjaro.org>
To: Eugenio Bargiacchi <svalorzen@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: Better visual separation of hunks in `git add -p`
Date: Thu, 28 Mar 2024 22:49:04 +0100 [thread overview]
Message-ID: <a26d1f79fce1ecc5671e7539c390b2b9@manjaro.org> (raw)
In-Reply-To: <CAHfn=+uXhAW+7YG6R6BAeTOcWdrGQjUwGYCT6QJ3u9d9TwaySg@mail.gmail.com>
On 2024-03-28 22:43, Eugenio Bargiacchi wrote:
> It seems to me that the two options are orthogonal: allowing the user
> to add an arbitrary prefix is not a block for allowing the user to
> clear the screen or vice-versa. If anything, the arbitrary prefix
> seems the more general flag to me as it at least offers a way (however
> unportable) to perform a clear. So saying that if we do not allow the
> user to clear the screen then it is not fine to add arbitrary prefixes
> seems strange.
Well, it all depends on one's perspective. To me more precise, I don't
care about the prefixes because I've never wanted them, but I'd like to
be
able to clear the screen. Thus, from my viewpoint, which is presumably
shared with other users, forcing me to use the prefix to be able to
clear
the screen, and to use it in a messy way, makes little sense.
I hope this makes my perspective mroe clear.
> On Thu, 28 Mar 2024 at 22:19, Dragan Simic <dsimic@manjaro.org> wrote:
>>
>> On 2024-03-28 21:43, Junio C Hamano wrote:
>> > Dragan Simic <dsimic@manjaro.org> 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.
prev parent reply other threads:[~2024-03-28 21:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-28 13:36 Better visual separation of hunks in `git add -p` Eugenio Bargiacchi
2024-03-28 16:50 ` Junio C Hamano
2024-03-28 17:10 ` Eugenio Bargiacchi
2024-03-28 18:14 ` Dragan Simic
2024-03-28 18:21 ` Junio C Hamano
2024-03-28 18:29 ` Dragan Simic
2024-03-28 19:01 ` Eugenio Bargiacchi
2024-03-28 19:04 ` Dragan Simic
2024-03-28 19:08 ` Eugenio Bargiacchi
2024-03-28 19:16 ` Dragan Simic
2024-03-28 20:43 ` Junio C Hamano
2024-03-28 21:19 ` Dragan Simic
2024-03-28 21:43 ` Eugenio Bargiacchi
2024-03-28 21:49 ` Dragan Simic [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a26d1f79fce1ecc5671e7539c390b2b9@manjaro.org \
--to=dsimic@manjaro.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=svalorzen@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).