git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-prompt: GIT_PS1_SHOWCONFLICTSTATE variable fix

From
Michiel Beijen <mb@x14.nl>
Date
Mar 24, 2024, 17:18 UTC
Message-ID
<379141b4-d715-41b9-973f-ec0349ed11a5@x14.nl>
In-Reply-To
<CAGTqyRykxy2GJV6b4yavWnegbz0HwykaT7bExOXK4wENdoF+Qg@mail.gmail.com>
On 19-03-2024 23:58, Justin Donnelly wrote:
Show 16 quoted lines
> Hi Michiel,
> This is my code, so I'm really glad somebody else finds it useful!
>
>
> On Tue, Mar 19, 2024 at 4:33 PM Michiel W. Beijen <mb@x14.nl> wrote:
>> There are a few environment variables that can influence the output for
>> the __git_ps1 macro in git-prompt.sh. All settings that are 'on/off'
>> types such as GIT_PS1_SHOWUNTRACKEDFILES and GIT_PS1_SHOWDIRTYSTATE
>> just take any value, and in the tests are tested with 'y', however
>> GIT_PS1_SHOWCONFLICTSTATE must be set to 'yes' otherwise it will not
>> work.
> I had actually considered using set/unset (for the same reason as you
> - consistency), but was advised to use a boolean flag.
>
> See: https://marc.info/?l=git&m=165897458021238&w=2 and
> https://marc.info/?l=git&m=165903017715652&w=2

I read the comments in that thread. While requiring the setting be set to 'yes' explicitly might make it possible to change it to a three-way switch in some unknown future, I think right now it is confusing and strange that of the many settings for GIT_PS1 only this one requires the explicit value 'yes'.

So I would still request to consider this change.
--
Michiel
Previous: Justin DonnellyNext: Justin Donnelly
Message 3 of 4 in “git-prompt: GIT_PS1_SHOWCONFLICTSTATE variable fix”
  1. git-prompt: GIT_PS1_SHOWCONFLICTSTATE variable fixMichiel W. Beijen, Mar 19, 2024
  2. Justin DonnellyMar 19, 2024
  3. Michiel BeijenMar 24, 2024
  4. Justin DonnellyMar 24, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.