{"thread":{"id":"34380","subject":"[PATCH] Corrects an Abort Trap: 6 error with completions.","startedAt":"2013-07-08T13:58:33Z","lastAt":"2013-07-08T17:45:43Z","messageCount":3,"participants":["Steven Klass","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"222827","messageId":"5FF738AB-DA01-4460-9ADF-D960E2FD6309@7stalks.com","threadId":"34380","inReplyTo":null,"subject":"[PATCH] Corrects an Abort Trap: 6 error with completions.","fromName":"Steven Klass","fromEmail":"sklass@7stalks.com","sentAt":"2013-07-08T13:58:33Z","receivedAt":"2013-07-08T13:58:33Z","isPatch":true,"sender":{"key":"sklass@7stalks.com","avatar":null},"body":"Hi Folks,\n\n\tCorrects an Abort Trap: 6 error with completions.\n\tFixed 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.\n\nSigned-off-by: Steven Klass <sklass@7stalks.com>\n\n---\n contrib/completion/git-completion.bash | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n mode change 100644 => 100755 contrib/completion/git-completion.bash\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nold mode 100644\nnew mode 100755\nindex 6c3bafe..d63b1ba\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -2165,7 +2165,8 @@ _git_config ()\n           user.name\n           user.signingkey\n           web.browser\n-          branch. remote.\n+          branch.\n+          remote.\n      \"\n }\n\n---\n\nSteven Klass\n\n(480) 225-1112\nsklass@7stalks.com\nhttp://www.7stalks.com\n"},{"id":"222848","messageId":"7vwqp1yn1w.fsf@alter.siamese.dyndns.org","threadId":"34380","inReplyTo":"5FF738AB-DA01-4460-9ADF-D960E2FD6309@7stalks.com","subject":"Re: [PATCH] Corrects an Abort Trap: 6 error with completions.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-07-08T17:32:59Z","receivedAt":"2013-07-08T17:32:59Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Steven Klass <sklass@7stalks.com> writes:\n\n> Hi Folks,\n>\n> \tCorrects an Abort Trap: 6 error with completions.\n> \tFixed 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.\n>\n> Signed-off-by: Steven Klass <sklass@7stalks.com>\n\nCan you explain how/why the original causes \"abort trap: 6\"\n(whatever it is) and how/why the updated one avoids it in the log\nmessage?\n\nIt also is not quite clear when the error happens.  Do you mean, by\n\"non-git commands\", something like:\n\n    $ ca<TAB>\n\ndoes not complete to \"cal\", \"case\", \"cat\", etc. and instead breaks\nthe shell?\n\nI am confused.  The only change I can see in the patch is that it\nmakes the argument to this call to the __gitcomp shell function be a\nstring with tokens separated by LF and HT and no SP (the original\nassumes that the tokens will be split by LF, HT or SP, and the shell\nfunction locally sets $IFS to make sure that the change in this\npatch does not make any difference).  And in many other places in\nthe same script, the __gitcomp shell function is called with an\nargument with LF, HT or SP spearated tokens, e.g.\n\n    _git_add ()\n    {\n            case \"$cur\" in\n            --*)\n                    __gitcomp \"\n                            --interactive --refresh --patch --update --dry-run\n                            --ignore-errors --intent-to-add\n                            \"\n                    return\n            esac\n\n\n\n>\n> ---\n>  contrib/completion/git-completion.bash | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n>  mode change 100644 => 100755 contrib/completion/git-completion.bash\n>\n> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n> old mode 100644\n> new mode 100755\n> index 6c3bafe..d63b1ba\n> --- a/contrib/completion/git-completion.bash\n> +++ b/contrib/completion/git-completion.bash\n> @@ -2165,7 +2165,8 @@ _git_config ()\n>            user.name\n>            user.signingkey\n>            web.browser\n> -          branch. remote.\n> +          branch.\n> +          remote.\n>       \"\n>  }\n>\n> ---\n>\n> Steven Klass\n>\n> (480) 225-1112\n> sklass@7stalks.com\n> http://www.7stalks.com\n"},{"id":"222850","messageId":"9699781D-9A21-4C65-86E7-50156F934C08@7stalks.com","threadId":"34380","inReplyTo":"7vwqp1yn1w.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Corrects an Abort Trap: 6 error with completions.","fromName":"Steven Klass","fromEmail":"sklass@7stalks.com","sentAt":"2013-07-08T17:45:43Z","receivedAt":"2013-07-08T17:45:43Z","isPatch":true,"sender":{"key":"sklass@7stalks.com","avatar":null},"body":"Hi Junio,\n\nFirst - Thanks so much for your reply!  \n\n\tThe original cause was simply running a non-related command.  Specifically I was trying to build some internal software.  Our internal software uses a build build tool from perforce called jam (http://www.perforce.com/resources/documentation/jam).  Similar to the make build tool this looks up a Jamfile (ergo Makefile) and does the recipe.  The issue is that running `jam` fatally aborts right from the start with an unintuitive `abort trap: 6` error.  \n\n\tAs you can well imagine figuring out what was causing this was pretty difficult - because both the error was cryptic and so unrelated.  I started backing out my environment until I was able to narrow this down to the bash_completions file.  Further investigation finally nailed it on the concatenation of the  `branch. remote.` line 2165.    In summary when the lines were joined it showed the error, when they were on separate lines everything processed as expected.\n\n\tAgain - my only change was to shift them (  branch. remote. ) to two separate lines.\n\nHTH\n\n---\n\nSteven Klass\n\n(480) 225-1112\nsklass@7stalks.com\nhttp://www.7stalks.com\n\nOn Jul 8, 2013, at 10:32 AM, Junio C Hamano <gitster@pobox.com> wrote:\n\n> Steven Klass <sklass@7stalks.com> writes:\n> \n>> Hi Folks,\n>> \n>> \tCorrects an Abort Trap: 6 error with completions.\n>> \tFixed 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.\n>> \n>> Signed-off-by: Steven Klass <sklass@7stalks.com>\n> \n> Can you explain how/why the original causes \"abort trap: 6\"\n> (whatever it is) and how/why the updated one avoids it in the log\n> message?\n> \n> It also is not quite clear when the error happens.  Do you mean, by\n> \"non-git commands\", something like:\n> \n>    $ ca<TAB>\n> \n> does not complete to \"cal\", \"case\", \"cat\", etc. and instead breaks\n> the shell?\n> \n> I am confused.  The only change I can see in the patch is that it\n> makes the argument to this call to the __gitcomp shell function be a\n> string with tokens separated by LF and HT and no SP (the original\n> assumes that the tokens will be split by LF, HT or SP, and the shell\n> function locally sets $IFS to make sure that the change in this\n> patch does not make any difference).  And in many other places in\n> the same script, the __gitcomp shell function is called with an\n> argument with LF, HT or SP spearated tokens, e.g.\n> \n>    _git_add ()\n>    {\n>            case \"$cur\" in\n>            --*)\n>                    __gitcomp \"\n>                            --interactive --refresh --patch --update --dry-run\n>                            --ignore-errors --intent-to-add\n>                            \"\n>                    return\n>            esac\n> \n> \n> \n>> \n>> ---\n>> contrib/completion/git-completion.bash | 3 ++-\n>> 1 file changed, 2 insertions(+), 1 deletion(-)\n>> mode change 100644 => 100755 contrib/completion/git-completion.bash\n>> \n>> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n>> old mode 100644\n>> new mode 100755\n>> index 6c3bafe..d63b1ba\n>> --- a/contrib/completion/git-completion.bash\n>> +++ b/contrib/completion/git-completion.bash\n>> @@ -2165,7 +2165,8 @@ _git_config ()\n>>           user.name\n>>           user.signingkey\n>>           web.browser\n>> -          branch. remote.\n>> +          branch.\n>> +          remote.\n>>      \"\n>> }\n>> \n>> ---\n>> \n>> Steven Klass\n>> \n>> (480) 225-1112\n>> sklass@7stalks.com\n>> http://www.7stalks.com\n"}]}