Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] _git: Also complete FETCH_HEAD, ORIG_HEAD and MERGE_HEAD.
- X-seq: zsh-workers 27816
- From: Simon Ruderich <simon@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] _git: Also complete FETCH_HEAD, ORIG_HEAD and MERGE_HEAD.
- Date: Mon, 22 Mar 2010 02:25:44 +0100
- In-reply-to: <dbfc82861003211317t7617b83ex2be594d2d994f328@xxxxxxxxxxxxxx>
- 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: <20100321172336.GA4151@xxxxxxxxxxxx> <alpine.LNX.2.01.1003211540430.19615@xxxxxxxxxxx> <dbfc82861003211317t7617b83ex2be594d2d994f328@xxxxxxxxxxxxxx>
On Sun, Mar 21, 2010 at 09:17:25PM +0100, Nikolai Weibull wrote:
> On Sun, Mar 21, 2010 at 20:48, Benjamin R. Haskell wrote:
>
>> + symbolic_heads=()
>> + for head in HEAD ORIG_HEAD FETCH_HEAD MERGE_HEAD ; do
>> + git rev-parse $head &>/dev/null && symbolic_heads+=( $head )
>> + done
>
> Thatâs a lot of forking to make a simple check. Is there no better
> way? Do we actually have to filter the heads?
I don't know the _git completion code, but couldn't we just check
if .git/{ORIG_HEAD,FETCH_HEAD,MERGE_HEAD} exists? This should
work for most things.
Another possibility would be to just complete them all the time.
Simon
--
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9
Attachment:
pgpsrQFiLkJBS.pgp
Description: PGP signature
Messages sorted by:
Reverse Date,
Date,
Thread,
Author