* Minor bug in bash completion
@ 2009-12-29 14:36 Sylvain RABOT
2009-12-30 11:22 ` SZEDER Gábor
0 siblings, 1 reply; 4+ messages in thread
From: Sylvain RABOT @ 2009-12-29 14:36 UTC (permalink / raw)
To: spearce; +Cc: git
Hello,
I found a bug in the git bash completion.
It occurs when I press tab to complete branch name when I want to pull
from the origin.
Instead of completing the branch name it prompts me directly for my
password on the origin remote.
I pressed tab
here (just after mem)
|
srabot@khety:~/dev/ribeti.git[memcached]$ git pull origin
memsrabot@git.ps.agematis.loc's password:
srabot@git.ps.agematis.loc's password:
cached
srabot@git.ps.agematis.loc's password:
From git.ps.agematis.loc:/var/git/ribeti
* branch memcached -> FETCH_HEAD
Already up-to-date.
I'm using :
Linux khety 2.6.31-16-generic #53-Ubuntu SMP Tue Dec 8 04:01:29 UTC 2009
i686 GNU/Linux
GNU bash, version 4.0.33(1)-release (i486-pc-linux-gnu)
git version 1.6.6
Best regards.
--
Sylvain
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Minor bug in bash completion
2009-12-29 14:36 Minor bug in bash completion Sylvain RABOT
@ 2009-12-30 11:22 ` SZEDER Gábor
2009-12-30 17:59 ` Sylvain Rabot
2009-12-30 18:00 ` Junio C Hamano
0 siblings, 2 replies; 4+ messages in thread
From: SZEDER Gábor @ 2009-12-30 11:22 UTC (permalink / raw)
To: Sylvain RABOT; +Cc: spearce, git
Hi Sylvain,
On Tue, Dec 29, 2009 at 03:36:58PM +0100, Sylvain RABOT wrote:
> I found a bug in the git bash completion.
> It occurs when I press tab to complete branch name when I want to pull
> from the origin.
> Instead of completing the branch name it prompts me directly for my
> password on the origin remote.
I don't think it's a bug. The completion script should offer the
currently available refs in the remote repository after a 'git pull
<remote> <TAB>'. In order to do that it contacts the remote
repository for the list of refs available there. Depending on the
access method, it might need to authenticate, in your case via ssh.
To silence the password prompts you should change your ssh
configuration to use key-based authentication when logging in to the
remote repository's server (just google for 'ssh login without
password').
Best,
Gábor
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Minor bug in bash completion
2009-12-30 11:22 ` SZEDER Gábor
@ 2009-12-30 17:59 ` Sylvain Rabot
2009-12-30 18:00 ` Junio C Hamano
1 sibling, 0 replies; 4+ messages in thread
From: Sylvain Rabot @ 2009-12-30 17:59 UTC (permalink / raw)
To: git
On Wed, 2009-12-30 at 12:22 +0100, SZEDER Gábor wrote:
> Hi Sylvain,
>
>
> On Tue, Dec 29, 2009 at 03:36:58PM +0100, Sylvain RABOT wrote:
> > I found a bug in the git bash completion.
> > It occurs when I press tab to complete branch name when I want to pull
> > from the origin.
> > Instead of completing the branch name it prompts me directly for my
> > password on the origin remote.
>
> I don't think it's a bug. The completion script should offer the
> currently available refs in the remote repository after a 'git pull
> <remote> <TAB>'. In order to do that it contacts the remote
> repository for the list of refs available there. Depending on the
> access method, it might need to authenticate, in your case via ssh.
> To silence the password prompts you should change your ssh
> configuration to use key-based authentication when logging in to the
> remote repository's server (just google for 'ssh login without
> password').
>
>
> Best,
> Gábor
Haaa,
I understand now, tough, I thought that the list of origin's branches
where stored somewhere in my local repository and that I needed to do a
"git remote update origin" to get the current origin branches list.
Thanks for your answer.
Regards.
--
Sylvain Rabot <sylvain@abstraction.fr>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Minor bug in bash completion
2009-12-30 11:22 ` SZEDER Gábor
2009-12-30 17:59 ` Sylvain Rabot
@ 2009-12-30 18:00 ` Junio C Hamano
1 sibling, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2009-12-30 18:00 UTC (permalink / raw)
To: SZEDER Gábor; +Cc: Sylvain RABOT, spearce, git
SZEDER Gábor <szeder@ira.uka.de> writes:
> On Tue, Dec 29, 2009 at 03:36:58PM +0100, Sylvain RABOT wrote:
>> I found a bug in the git bash completion.
>> It occurs when I press tab to complete branch name when I want to pull
>> from the origin.
>> Instead of completing the branch name it prompts me directly for my
>> password on the origin remote.
>
> I don't think it's a bug. The completion script should offer the
> currently available refs in the remote repository after a 'git pull
> <remote> <TAB>'. In order to do that it contacts the remote
> repository for the list of refs available there.
It is definitely a non-bug since the user _asked_ to complete and the
information necessary to do the job the user _asked_ to do is only
accessible over the network connection.
I however do think this is an annoyance when it happens to you by
accident. I wonder if it is worth to have a way for users to tell
completion to skip the ls-remote invocation (hence not getting branches
completed) depending on the type of remote.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-12-30 18:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-29 14:36 Minor bug in bash completion Sylvain RABOT
2009-12-30 11:22 ` SZEDER Gábor
2009-12-30 17:59 ` Sylvain Rabot
2009-12-30 18:00 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).