git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Robert Dailey <rcdailey.lists@gmail.com>
To: "SZEDER Gábor" <szeder@ira.uka.de>
Cc: "Stefan Näwe" <stefan.naewe@atlas-elektronik.com>,
	Git <git@vger.kernel.org>
Subject: Re: Git completion not using ls-remote to auto-complete during push
Date: Thu, 18 Jun 2015 10:27:16 -0500	[thread overview]
Message-ID: <CAHd499DeUOqsuSoysaOAAYORk3B=XBXco9yEKdXt8m4XJYFyZw@mail.gmail.com> (raw)
In-Reply-To: <1434626973-4801-1-git-send-email-szeder@ira.uka.de>

On Thu, Jun 18, 2015 at 6:29 AM, SZEDER Gábor <szeder@ira.uka.de> wrote:
> Quoting Robert Dailey <rcdailey.lists@gmail.com>
>> I do the following:
>>
>> $ git push origin :topic
>>
>> If I stop halfway through typing 'topic' and hit TAB, auto-completion
>> does not work if I do not have a local branch by that name (sometimes
>> I delete my local branch first, then I push to delete it remotely). I
>> thought that git completion code was supposed to use ls-remote to auto
>> complete refs used in push operations. Is this supposed to work?
>
> It's intentional.  Running 'git ls-remote' with a far away remote can
> take ages, so instead we grab the refs on the remote from the locally
> stored refs under 'refs/remotes/<remote>/'.
>
> See e832f5c096 (completion: avoid ls-remote in certain scenarios,
> 2013-05-28).  The commit message mentions that you can "force"
> completion of remote refs via 'git ls-remote' by starting with the full
> refname, i.e.  'refs/<TAB>', however, that seems to work only on the
> left hand side of the colon in the push refspec.
>
> Gábor
>

If that's indeed the case, then completion should work. I have a
'refs/remotes/origin/topic'. Why will auto complete not work even
though this exists? Do multiple remotes cause issues (in theory there
is no reason why it should cause problems, since it should know I'm
auto-completing a ref on 'origin')?

  reply	other threads:[~2015-06-18 15:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-17 16:10 Git completion not using ls-remote to auto-complete during push Robert Dailey
2015-06-18  7:03 ` Stefan Näwe
2015-06-18 11:29 ` SZEDER Gábor
2015-06-18 15:27   ` Robert Dailey [this message]
2015-06-18 15:55     ` SZEDER Gábor
2015-06-18 19:12       ` Robert Dailey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHd499DeUOqsuSoysaOAAYORk3B=XBXco9yEKdXt8m4XJYFyZw@mail.gmail.com' \
    --to=rcdailey.lists@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=stefan.naewe@atlas-elektronik.com \
    --cc=szeder@ira.uka.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).