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

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

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 22, 2013, 07:56 UTC
Message-ID
<CAMP44s2KhSNXF8rkkYcGvzi7xxr11oXQW4+Yj3-u+aZ1EDHguQ@mail.gmail.com>
In-Reply-To
<1369208439-20061-1-git-send-email-t.gummerer@gmail.com>
On Wed, May 22, 2013 at 2:40 AM, Thomas Gummerer <t.gummerer@gmail.com> wrote:
Show 25 quoted lines
> 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[
>    __git_ps1_show_upstream:45: bad substitution
>
> To reproduce the problem, the __git_ps1_show_upstream function can be
> executed in a repository converted with git-svn.  Both those errors are
> triggered by spaces after the '['.
>
> Zsh also doesn't support initializing an array with `local var=(...)`.
> This triggers the following error:
>
>    __git_ps1_show_upstream:41: bad pattern: svn_upstream=(commit
>
> Use
>    local -a
>    var=(...)
> instead to make is compatible.
>
> This was introduced by 6d158cba (bash completion: Support "divergence
> from upstream" messages in __git_ps1), when the script was for bash
> only.
>
> Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>

I think there's no need to be so verbose in the commit message, but hey, that's just an opinion.

Acknowledged-by: Felipe Contreras <felipe.contreras@gmail.com>
-- 
Felipe Contreras
Previous: Thomas Gummerer
Message 14 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.