{"thread":{"id":"22051","subject":"Minor bug in bash completion","startedAt":"2009-12-29T14:36:58Z","lastAt":"2009-12-30T18:00:05Z","messageCount":4,"participants":["Sylvain RABOT","SZEDER Gábor","Junio C Hamano","Sylvain Rabot"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"130456","messageId":"4B3A140A.60302@steek.com","threadId":"22051","inReplyTo":null,"subject":"Minor bug in bash completion","fromName":"Sylvain RABOT","fromEmail":"srabot@steek.com","sentAt":"2009-12-29T14:36:58Z","receivedAt":"2009-12-29T14:36:58Z","isPatch":false,"sender":{"key":"srabot@steek.com","avatar":null},"body":"Hello,\n\nI found a bug in the git bash completion.\nIt occurs when I press tab to complete branch name when I want to pull \nfrom the origin.\nInstead of completing the branch name it prompts me directly for my \npassword on the origin remote.\n\n\n                                                          I pressed tab \nhere (just after mem)\n                                                             |\nsrabot@khety:~/dev/ribeti.git[memcached]$ git pull origin \nmemsrabot@git.ps.agematis.loc's password:\nsrabot@git.ps.agematis.loc's password:\ncached\nsrabot@git.ps.agematis.loc's password:\n From git.ps.agematis.loc:/var/git/ribeti\n * branch            memcached  -> FETCH_HEAD\nAlready up-to-date.\n\n\nI'm using :\n\nLinux khety 2.6.31-16-generic #53-Ubuntu SMP Tue Dec 8 04:01:29 UTC 2009 \ni686 GNU/Linux\nGNU bash, version 4.0.33(1)-release (i486-pc-linux-gnu)\ngit version 1.6.6\n\nBest regards.\n\n-- \nSylvain\n"},{"id":"130546","messageId":"20091230112222.GA493@neumann","threadId":"22051","inReplyTo":"4B3A140A.60302@steek.com","subject":"Re: Minor bug in bash completion","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2009-12-30T11:22:22Z","receivedAt":"2009-12-30T11:22:22Z","isPatch":false,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"Hi Sylvain,\n\n\nOn Tue, Dec 29, 2009 at 03:36:58PM +0100, Sylvain RABOT wrote:\n> I found a bug in the git bash completion.\n> It occurs when I press tab to complete branch name when I want to pull  \n> from the origin.\n> Instead of completing the branch name it prompts me directly for my  \n> password on the origin remote.\n\nI don't think it's a bug.  The completion script should offer the\ncurrently available refs in the remote repository after a 'git pull\n<remote> <TAB>'.  In order to do that it contacts the remote\nrepository for the list of refs available there.  Depending on the\naccess method, it might need to authenticate, in your case via ssh.\nTo silence the password prompts you should change your ssh\nconfiguration to use key-based authentication when logging in to the\nremote repository's server (just google for 'ssh login without\npassword').\n\n\nBest,\nGábor\n"},{"id":"130570","messageId":"1262195978.3552.4.camel@kheops","threadId":"22051","inReplyTo":"20091230112222.GA493@neumann","subject":"Re: Minor bug in bash completion","fromName":"Sylvain Rabot","fromEmail":"sylvain@abstraction.fr","sentAt":"2009-12-30T17:59:38Z","receivedAt":"2009-12-30T17:59:38Z","isPatch":false,"sender":{"key":"sylvain@abstraction.fr","avatar":"https://avatars.githubusercontent.com/u/153052?v=4"},"body":"On Wed, 2009-12-30 at 12:22 +0100, SZEDER Gábor wrote:\n> Hi Sylvain,\n> \n> \n> On Tue, Dec 29, 2009 at 03:36:58PM +0100, Sylvain RABOT wrote:\n> > I found a bug in the git bash completion.\n> > It occurs when I press tab to complete branch name when I want to pull  \n> > from the origin.\n> > Instead of completing the branch name it prompts me directly for my  \n> > password on the origin remote.\n> \n> I don't think it's a bug.  The completion script should offer the\n> currently available refs in the remote repository after a 'git pull\n> <remote> <TAB>'.  In order to do that it contacts the remote\n> repository for the list of refs available there.  Depending on the\n> access method, it might need to authenticate, in your case via ssh.\n> To silence the password prompts you should change your ssh\n> configuration to use key-based authentication when logging in to the\n> remote repository's server (just google for 'ssh login without\n> password').\n> \n> \n> Best,\n> Gábor\n\nHaaa,\n\nI understand now, tough, I thought that the list of origin's branches\nwhere stored somewhere in my local repository and that I needed to do a\n\"git remote update origin\" to get the current origin branches list.\n\nThanks for your answer.\n\nRegards.\n\n-- \nSylvain Rabot <sylvain@abstraction.fr>\n"},{"id":"130568","messageId":"7v1vic2vh6.fsf@alter.siamese.dyndns.org","threadId":"22051","inReplyTo":"20091230112222.GA493@neumann","subject":"Re: Minor bug in bash completion","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-12-30T18:00:05Z","receivedAt":"2009-12-30T18:00:05Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"SZEDER Gábor <szeder@ira.uka.de> writes:\n\n> On Tue, Dec 29, 2009 at 03:36:58PM +0100, Sylvain RABOT wrote:\n>> I found a bug in the git bash completion.\n>> It occurs when I press tab to complete branch name when I want to pull  \n>> from the origin.\n>> Instead of completing the branch name it prompts me directly for my  \n>> password on the origin remote.\n>\n> I don't think it's a bug.  The completion script should offer the\n> currently available refs in the remote repository after a 'git pull\n> <remote> <TAB>'.  In order to do that it contacts the remote\n> repository for the list of refs available there.\n\nIt is definitely a non-bug since the user _asked_ to complete and the\ninformation necessary to do the job the user _asked_ to do is only\naccessible over the network connection.\n\nI however do think this is an annoyance when it happens to you by\naccident.  I wonder if it is worth to have a way for users to tell\ncompletion to skip the ls-remote invocation (hence not getting branches\ncompleted) depending on the type of remote.\n"}]}