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

Re: [PATCH 0/3] git-prompt: add quiet upstream indicator option

From
KIKiril Ivanov <ivanovkirilg@gmail.com>
Date
Nov 16, 2025, 12:05 UTC
Message-ID
<CANHi5upZdwi33upTFL01NymMqK7dCWEbj8XAOEydCDMf4bSFzw@mail.gmail.com>
In-Reply-To
<xmqqjyzrdpqu.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> wrote:
> ... (this is a reaction to seeing
> some bash-isms in these patches.  No complaints here, as the test
> script is all about the command line prompt feature to be used with
> bash and nothing else).

Actually, this got me reconsidering. The prompt feature claims at least to support zsh in addition to bash, and it has had modifications to make it more compliant:

<pull.1750.git.git.1721762306.gitgitgadget@gmail.com>
> After this patchset, the following shells work: bash, zsh, dash (since at
> least 0.5.8), free/net bsd sh, busybox-ash, mksh, openbsd sh, pdksh(!),
> Schily extended Bourne sh (bosh), yash.

And the test seems to run successfully under 'sh' in master with: -. ./lib-bash.sh +. ./test-lib.sh (Passes normally, and fails when the 'expected' strings are clobbered.)

... Which is all to say that the bash-isms may be undesirable even here.

Unfortunately, I have been struggling (for an embarrassing couple of hours) to replace them with something standard that still keeps the matrix-like form of the test parameters. If anyone more experienced in scripting has an itch to help, it's welcome.

Since I originally intended this to be a two-line change, I'd rather wait to see if it is even a welcome addition before I spend more time on it.

Thanks Junio for the feedback!
Previous: Junio C HamanoNext: Junio C Hamano
Message 9 of 10 in “git-prompt: add quiet upstream indicator option”
  1. 0/3 git-prompt: add quiet upstream indicator optionKiril Ivanov via GitGitGadget, Nov 15, 2025
  2. 1/3 t9903: shorten setup using test_commitKiril Ivanov via GitGitGadget, Nov 15, 2025
  3. 2/3 t9903: add upstream indicator testsKiril Ivanov via GitGitGadget, Nov 15, 2025
  4. 3/3 git-prompt: add quiet upstream indicator optionKiril Ivanov via GitGitGadget, Nov 15, 2025
  5. D. Ben KnobleNov 20, 2025
  6. Eric SunshineNov 20, 2025
  7. D. Ben KnobleNov 20, 2025
  8. Junio C HamanoNov 15, 2025
  9. Kiril IvanovNov 16, 2025
  10. Junio C HamanoNov 16, 2025

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.