{"thread":{"id":"38868","subject":"bug in bash completion for git-branch --set-upstream-to on OSX","startedAt":"2015-03-20T15:15:09Z","lastAt":"2015-03-22T03:24:45Z","messageCount":2,"participants":["Jason Karns","Eric Sunshine"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"258132","messageId":"CAKNmmv3wu-5s9UB_RFO5Wptdo+a71Lmzn2Zs4kb=MwnFoTctCg@mail.gmail.com","threadId":"38868","inReplyTo":null,"subject":"bug in bash completion for git-branch --set-upstream-to on OSX","fromName":"Jason Karns","fromEmail":"karns.17@gmail.com","sentAt":"2015-03-20T15:15:09Z","receivedAt":"2015-03-20T15:15:09Z","isPatch":false,"sender":{"key":"karns.17@gmail.com","avatar":"https://gravatar.com/avatar/d7d24352c316abc20ea60ad9940f03f2a3523b7f8ca7b979017c5175b8d2307d?d=mp&s=160"},"body":"There appears to be a bug in the bash completion for git-branch when\nattempting to complete the remote ref argument for --set-upstream-to=\n\nWhen:\n\n$ git branch --set-upstream-to=origin/mast<TAB>\n\nI would expect it to complete to:\n\n$ git branch --set-upstream-to=origin/master\n\nHowever, the completion for --set-upstream-to= completes the ref\ncorrectly, but completely wipes the --set-upstream option; resulting\nin:\n\n$ git branch origin/master\n\n\nI'm running on OS X 10.9.5 with git from homebrew:\n$ bash --version\nGNU bash, version 4.3.33(1)-release (x86_64-apple-darwin13.4.0)\n$ git --version\ngit version 2.3.3\n\nThe same behavior does *not* manifest (it works as expected) on CentOS\n6.5, bash 4.1.2.1 (GNU bash, version 4.1.2(1)-release\n(x86_64-redhat-linux-gnu)). I'm running git 2.0.3 on CentOs but\nsourcing the shell completion script from latest source: 9ab698f\n\nI also cloned down latest git source on OS X and the bug still\nmanifests when sourcing the completion script at 9ab698f.\n\n~ Jason\n"},{"id":"258263","messageId":"CAPig+cRYQfSNvyCXJc2a4wFAsZ8S4v3zvc5K5-fW+guepMeVPg@mail.gmail.com","threadId":"38868","inReplyTo":"CAKNmmv3wu-5s9UB_RFO5Wptdo+a71Lmzn2Zs4kb=MwnFoTctCg@mail.gmail.com","subject":"Re: bug in bash completion for git-branch --set-upstream-to on OSX","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2015-03-22T03:24:45Z","receivedAt":"2015-03-22T03:24:45Z","isPatch":false,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Fri, Mar 20, 2015 at 11:15 AM, Jason Karns <karns.17@gmail.com> wrote:\n> There appears to be a bug in the bash completion for git-branch when\n> attempting to complete the remote ref argument for --set-upstream-to=\n>\n> When:\n>\n> $ git branch --set-upstream-to=origin/mast<TAB>\n>\n> I would expect it to complete to:\n>\n> $ git branch --set-upstream-to=origin/master\n>\n> However, the completion for --set-upstream-to= completes the ref\n> correctly, but completely wipes the --set-upstream option; resulting\n> in:\n>\n> $ git branch origin/master\n>\n> I'm running on OS X 10.9.5 with git from homebrew:\n> $ bash --version\n> GNU bash, version 4.3.33(1)-release (x86_64-apple-darwin13.4.0)\n\nPresumably, your bash is also from homebrew? Stock OS X bash tends to\nbe quite a bit older.\n\n> $ git --version\n> git version 2.3.3\n\nI'm unable to reproduce this problem using git 2.3.3 and bash 4.3.33.\n\n> The same behavior does *not* manifest (it works as expected) on CentOS\n> 6.5, bash 4.1.2.1 (GNU bash, version 4.1.2(1)-release\n> (x86_64-redhat-linux-gnu)). I'm running git 2.0.3 on CentOs but\n> sourcing the shell completion script from latest source: 9ab698f\n>\n> I also cloned down latest git source on OS X and the bug still\n> manifests when sourcing the completion script at 9ab698f.\n\nPerhaps something in your bash startup script(s) is causing a strange\ninteraction.\n"}]}