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

Re: [PATCH] prompt: fix show upstream with svn and zsh

From
Thomas Gummerer <t.gummerer@gmail.com>
Date
May 22, 2013, 07:36 UTC
Message-ID
<877gir31ql.fsf@gmail.com>
In-Reply-To
<CAMP44s3uEaG3Y+cVoKhCA-f+hi1VZcCpXO5bYCQLvANDdvYwRA@mail.gmail.com>
Felipe Contreras <felipe.contreras@gmail.com> writes:
Show 18 quoted lines
> On Tue, May 21, 2013 at 3:54 PM, Thomas Gummerer <t.gummerer@gmail.com> wrote:
>> Currently the __git_ps1 git prompt gives the following error with a
>> repository converted by git-svn, when used with zsh:
>>
>>            __git_ps1_show_upstream:19: bad pattern: svn_remote[
>>
>> This was introduced by 6d158cba (bash completion: Support "divergence
>> from upstream" messages in __git_ps1), when the script was for bash
>> only.  Make it compatible with zsh.
>>
>> Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
>
> This patch is fine by me. I would like to see an example of how to
> trigger the issue with a standalone command in the commit message, but
> it's not necessary. It would also make sense to address the comment
> from Szeder that does raise questions about other places in the code
> where 'array[ $foo ]' is used, maybe there's a caveat we are not
> considering, or maybe your use-case did not execute that code.
Yes, the code was not executed, it will be fixed in the re-roll.
> And finally, I don't recall seen 'set -a' used elsewhere in the code.
> If memory serves well, we have replaced 'local -a foo=value' with
> 'local -a foo\nfoo=value' before to fix zsh issues, I think that would
> be safer.
Yes, thanks for the suggestion, that works.
> But this patch is needed regardless, that, or the patch that broke
> things should be reverted for v1.8.3.

I don't think anything should or can be reverted, as this code was introduced in 2010, but nobody triggered it until now.

Show 6 quoted lines
> Thomas, if you don't have time, let me know and I can take a look.
>
> Cheers.
>
> --
> Felipe Contreras

Thanks, Thomas

Previous: Felipe ContrerasNext: Thomas Gummerer
Message 12 of 14 in “prompt: fix show upstream with svn and zsh”
  1. prompt: fix show upstream with svn and zshThomas Gummerer, May 21, 2013
  2. SZEDER GáborMay 21, 2013
  3. Felipe ContrerasMay 21, 2013
  4. SZEDER GáborMay 21, 2013
  5. Felipe ContrerasMay 22, 2013
  6. SZEDER GáborMay 22, 2013
  7. Felipe ContrerasMay 22, 2013
  8. SZEDER GáborMay 22, 2013
  9. Thomas GummererMay 22, 2013
  10. SZEDER GáborMay 28, 2013
  11. Felipe ContrerasMay 22, 2013
  12. Thomas GummererMay 22, 2013
  13. prompt: fix show upstream with svn and zshThomas Gummerer, May 22, 2013
  14. Felipe ContrerasMay 22, 2013

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.