Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Improved completion for git commit objects (__git_commit_objects)
- X-seq: zsh-workers 34692
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Mikael Magnusson <mikachu@xxxxxxxxx>
- Subject: Re: Improved completion for git commit objects (__git_commit_objects)
- Date: Mon, 9 Mar 2015 19:54:54 +0000
- Cc: Daniel Hahler <genml+zsh-workers@xxxxxxxxxx>, zsh workers <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=x-sasl-enc:date:from:to:cc:subject :message-id:references:mime-version:content-type:in-reply-to; s= mesmtp; bh=TTShV6tmhrhEIQm7D6s3zPAaEc8=; b=VKUIiLnxRXrDGS6dl9juf XK8cxpAWSB3e9991u/xZzQGREfTko7RRw5/qbXSCsK7AUsmFba34Z18llT5Sgpyx CV4JG/2JfyLF7qr3+SQyhlwxUcr5QcDC9cke0+sFikEVOy76vxZay4XfhrKlW5Pt 4pnNI/IDtLeth0KZ0oNaa0=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:date:from:to:cc:subject :message-id:references:mime-version:content-type:in-reply-to; s= smtpout; bh=TTShV6tmhrhEIQm7D6s3zPAaEc8=; b=rmFCYrbCpV8lxEW8f5jQ iC/BhFugv3SnlealbwRsqPMQLud3/QqPW4zuBv8YGh73JKGCg8tpEr+LrCE3+HNU zGwgQ8suK36GHWIwvtwU65ABwejR1rK7cY7UhMID9wCO1dAa5mhjIsZpOdgIl+Ur ihhAFoGJUhJj+y+Q5nj49cA=
- In-reply-to: <CAHYJk3QWFC_y3QH2fOdS2xKK5Xp6_4vK7RoKRF=HsXwFjdPKFQ@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <54F647E2.5020400@thequod.de> <20150307040139.GC2206@tarsus.local2> <CAHYJk3QWFC_y3QH2fOdS2xKK5Xp6_4vK7RoKRF=HsXwFjdPKFQ@mail.gmail.com>
Mikael Magnusson wrote on Sat, Mar 07, 2015 at 13:59:39 +0100:
> On Sat, Mar 7, 2015 at 5:01 AM, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> > % git ci --fixup=4<TAB>
> >> commit object name
> > 4bc554b -- 34636: replace broken isprint() on Mac OS X
> > 42e5f59 -- 34640: clarify documentation for _guard function
> > 4edcacb -- users/19934: document %D{...} for WATCHFMT
> > 49776e8 -- 34588: Complete 'usermod -a'
>
> When I tried adding sha1 completion a few years ago, the big
> showstopper was that any completion of a commit-ish or any -ish for
> that matter, would take several minutes in the linux kernel, since it
> has millions of blobs. Is this faster?
It only completes hashes from 'git log -20 --pretty=%h', which should do
O(1) work regardless of repo size.
FWIW, on my datasets the completion of "--fix<TAB>" to "--fixup=" takes
longer than generating and displaying the completion suggestions upon
hitting <TAB> after the equal sign. Even with cold caches on a 250MB
repo it takes just a few seconds.
Daniel
Messages sorted by:
Reverse Date,
Date,
Thread,
Author