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

Re: [PATCH] Fix git-completion.bash for use in zsh

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 20, 2012, 18:20 UTC
Message-ID
<7vpqc75e3r.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7vr4wn6y2k.fsf@alter.siamese.dyndns.org>
Show 8 quoted lines
> Alex Merry <kde@randomguy3.me.uk> writes:
> ...
>> On 01/09/11 14:47, Alex Merry wrote:
>>> Certain versions (or option combinations) of zsh appear to treat
>>> things like
>>> local some_var=()
>>> as a function declaration.  This makes errors appear when using it in
>>> combination with the GIT_PS1_SHOWUPSTREAM option.

The change in this patch itself may be innocuous, but we would point at the log message of the commit this patch would create to the next person who would write "local var=()" in contrib/completion/git-completion.bash file and tell him to fix his patch.

And for that purpose, the above log message is way too vague. It is unclear how the problem can be reproduced ("Certain versions"??? "option combinations"??? Even if you do not exhaustively enumerate the condition, you at least should be able to say which *one* version you observed the problem with, and with what option combinations). It does not even say what symptom to expect ("errors appear"??? What error message would one get?). We would need a more useful explanation to help people who make further changes to the code.

Also, the original patch was whitespace damaged IIRC.
Previous: Junio C Hamano
Message 4 of 4 in “Fix git-completion.bash for use in zsh”
  1. Fix git-completion.bash for use in zshAlex Merry, Sep 1, 2011
  2. Alex MerryMar 20, 2012
  3. Junio C HamanoMar 20, 2012
  4. Junio C HamanoMar 20, 2012

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.