git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Justin Donnelly <justinrdonnelly@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Justin Donnelly via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org
Subject: Re: [PATCH] git-prompt: show 'CONFLICT' indicator at command prompt
Date: Thu, 28 Jul 2022 19:33:28 -0400	[thread overview]
Message-ID: <CAGTqyRxTF=7PYCZm=xynQc2v55v-iim5iut9GxgT66E-Sqpiqg@mail.gmail.com> (raw)
In-Reply-To: <xmqqpmhpb08p.fsf@gitster.g>

On Thu, Jul 28, 2022 at 1:44 PM Junio C Hamano <gitster@pobox.com> wrote:
>
> Justin Donnelly <justinrdonnelly@gmail.com> writes:
>
> >> It is unusual to subject our unsuspecting users to new features in a
> >> way that is done by this patch.  A more usual practice, I think, is
> >> to tell the users that they can set GIT_PS1_INCLUDECONFLICTSTATE to
> >> "yes" if they want to opt in, and trigger the new feature only to
> >> them.  Later, we may decide that the feature is useful and widely
> >> apprlicable enough, at which time it may be turned on by default and
> >> tell the users to set GIT_PS1_INCLUDECONFLICTSTATE to "no" if they
> >> do not want to see it.  But one step at a time.
> >>
> >
> > I see that most of the state indicators are disabled by default, so it
> > makes sense to be consistent. Should I make a variable with 'yes'/'no'
> > values, or set/unset? 'yes'/'no' has the benefit that if the default
> > is later changed, existing setups will continue to work. Set/unset
> > makes it harder to change the default later ...
>
> As you said, "an environment variable that is set triggers the
> feature" is harder to transition.  Starting from a clear Boolean is
> probably easy to see what is going on, and that is why I suggested
> doing that way.
>
> Ones that are "if set, enabled" can be corrected later when needed,
> e.g. GIT_PS1_FROTZ may enable the feature FROTZ when the environment
> is set, but when we introduce two or more ways to do FROTZ thing
> (e.g. in addition to always do FROTZ, which may be the original
> design of "an environment that is set triggers the feature", we may
> add "automatically enable FROTZ only under this and that
> condition"), we may say "when set to 'auto', do the auto-FROTZ, and
> when set to 'yes', do FROTZ as we have always done.  When set to any
> other value, warn and then do FROTZ").  But let's leave them outside
> the scope of the topic.
>

Thanks. I'll incorporate these suggestions into a re-roll.

  reply	other threads:[~2022-07-28 23:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-26  1:23 [PATCH] git-prompt: show 'CONFLICT' indicator at command prompt Justin Donnelly via GitGitGadget
2022-07-27 20:13 ` Junio C Hamano
2022-07-28  2:17   ` Justin Donnelly
2022-07-28 17:44     ` Junio C Hamano
2022-07-28 23:33       ` Justin Donnelly [this message]
2022-07-29 22:08 ` [PATCH v2] git-prompt: show presence of unresolved conflicts " Justin Donnelly via GitGitGadget
2022-08-14 21:06   ` Justin Donnelly
2022-08-15  4:22     ` Junio C Hamano
2022-08-15 12:50       ` Johannes Schindelin
2022-08-16  3:36         ` Justin Donnelly
2022-08-15 13:04       ` Phillip Wood
2022-08-15 16:00         ` Junio C Hamano
2022-08-16  4:20           ` Justin Donnelly
2022-08-16 23:32             ` Justin Donnelly
2022-08-17  0:18   ` [PATCH v3] " Justin Donnelly via GitGitGadget
2022-08-19 11:29     ` Johannes Schindelin
2022-08-19 17:57       ` Junio C Hamano

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='CAGTqyRxTF=7PYCZm=xynQc2v55v-iim5iut9GxgT66E-Sqpiqg@mail.gmail.com' \
    --to=justinrdonnelly@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.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).