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

Re: [PATCH] Corrects an Abort Trap: 6 error with completions.

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 8, 2013, 17:32 UTC
Message-ID
<7vwqp1yn1w.fsf@alter.siamese.dyndns.org>
In-Reply-To
<5FF738AB-DA01-4460-9ADF-D960E2FD6309@7stalks.com>
Steven Klass <sklass@7stalks.com> writes:
Show 6 quoted lines
> Hi Folks,
>
> 	Corrects an Abort Trap: 6 error with completions.
> 	Fixed an issue where the two commands on a single line  would cause a strange unrelated 'Abort trap: 6' error on  non-git commands on Mac OSX 10.8.
>
> Signed-off-by: Steven Klass <sklass@7stalks.com>

Can you explain how/why the original causes "abort trap: 6" (whatever it is) and how/why the updated one avoids it in the log message?

It also is not quite clear when the error happens. Do you mean, by "non-git commands", something like:

    $ ca<TAB>

does not complete to "cal", "case", "cat", etc. and instead breaks the shell?

I am confused. The only change I can see in the patch is that it makes the argument to this call to the __gitcomp shell function be a string with tokens separated by LF and HT and no SP (the original assumes that the tokens will be split by LF, HT or SP, and the shell function locally sets $IFS to make sure that the change in this patch does not make any difference). And in many other places in the same script, the __gitcomp shell function is called with an argument with LF, HT or SP spearated tokens, e.g.

    _git_add ()
    {
            case "$cur" in
            --*)
                    __gitcomp "
                            --interactive --refresh --patch --update --dry-run
                            --ignore-errors --intent-to-add
                            "
                    return
            esac
Show 29 quoted lines
>
> ---
>  contrib/completion/git-completion.bash | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>  mode change 100644 => 100755 contrib/completion/git-completion.bash
>
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> old mode 100644
> new mode 100755
> index 6c3bafe..d63b1ba
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -2165,7 +2165,8 @@ _git_config ()
>            user.name
>            user.signingkey
>            web.browser
> -          branch. remote.
> +          branch.
> +          remote.
>       "
>  }
>
> ---
>
> Steven Klass
>
> (480) 225-1112
> sklass@7stalks.com
> http://www.7stalks.com
Previous: Steven KlassNext: Steven Klass
Message 2 of 3 in “Corrects an Abort Trap: 6 error with completions.”
  1. Corrects an Abort Trap: 6 error with completions.Steven Klass, Jul 8, 2013
  2. Junio C HamanoJul 8, 2013
  3. Steven KlassJul 8, 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.