Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: __git_recent_commits cannot be called twice Re: [PATCH 2/5] _git: Offer @~$n as completion of recent commits.
- X-seq: zsh-workers 37052
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- Subject: Re: __git_recent_commits cannot be called twice Re: [PATCH 2/5] _git: Offer @~$n as completion of recent commits.
- Date: Tue, 3 Nov 2015 13:42:34 +0000
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=GLDDU67YXZk5d2kQ pSdkfPPWSmo=; b=Qvx/xdKGq2alJpq0bpbCxjo/NzZ55XRYCq8NmbQWZefb0DEi UFHfdSOLATmLCGy2ttrZd85ASbqS4kurW2ySb9H6vd1blYg63KUmlPzFFDlfzz6D GXJPY5XD8eAeKjek4jxXiwP7bnvoi6yfi7aUpHroqpV8o96ce3E3X5eh3m8=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=GLDDU67YXZk5d2k QpSdkfPPWSmo=; b=nqAZnqokTHlk0tjcKd50Df1OAZDmZDWWDmHvvfE9XGOnJll nP2Hg30hAT8dRe6ceagqUssY+ztcfU9GnraksTi7Uxt8CEyYuC9pdhDkOlxzrZeS nXQrm/F3G7mYreKW+iOklM1fxpVbDzoVAz08PSJ3w50oxYjLRTsbZo+DuJzI=
- In-reply-to: <25552.1446323081@thecus.kiddle.eu>
- 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: <20151025183458.GK11372@tarsus.local2> <20151031125127.GA2360@tarsus.local2> <25552.1446323081@thecus.kiddle.eu>
Oliver Kiddle wrote on Sat, Oct 31, 2015 at 21:24:41 +0100:
> Daniel Shahaf wrote:
>
> > The new output works fine in 'git commit --fixup=<TAB>', but not in 'git
> > show <TAB>'. This is because the latter calls __git_recent_commits via
> > two distinct codepaths. Here's a minimal example:
>
> Calling one function via two codepaths is the basic problem here. We
> should avoid doing that rather than trying to hack it to work.
>
'git show ARG' can be either a tree or a revision. The latter calls
into __git_recent_commits directly; the former calls it because one form
to specify a tree is ${committish}:${subpath} (as in 'git show
HEAD^:Etc/'). That's why two codepaths reach the same function... it's
not a mistake, it's simply reflecting git's syntax.
> I've been thinking that it could be useful to add a helper like
> _describe but lacking the feature of grouping matches with a common
> description. That's the key feature of _describe. _describe is often
> used when it perhaps shouldn't be because it is also a simple and
> convenient function when you want descriptions. Any ideas on a name for
> such a new helper?
"_annotate".
Thanks for the rest of the email — a bit busy now but will reply when
I can.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author