Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] completion: git: fix __git_commit_objects/__git_recent_commits
- X-seq: zsh-workers 35203
- From: Daniel Hahler <genml+zsh-workers@xxxxxxxxxx>
- To: Zsh Hackers' List <zsh-workers@xxxxxxx>
- Subject: Re: [PATCH] completion: git: fix __git_commit_objects/__git_recent_commits
- Date: Tue, 19 May 2015 05:46:08 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thequod.de; h= content-transfer-encoding:content-type:content-type:in-reply-to :references:subject:subject:mime-version:user-agent:from:from :date:date:message-id:received:received; s=postfix2; t= 1432007169; bh=mBl5c9iQzksplbyac9HVXvpkaSE8TwgC5kIRfhPU4c4=; b=v RbNLMA019Eu+AFniC02TEg8MILikj9nVaW72RULJJP+pmc7mYq5eW71sL0rdewlI 1XeLf0cTytj+0BKYUrY3fUtvheUQDr80D3mBZjaK1vqlVzSgeBTDCj97+/tAMGVn 2imrPZU9Mzb9a7ITIths/o7qILAKY38uxrV3lDIFjQ=
- In-reply-to: <20150517234642.GI2214@tarsus.local2>
- 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: <1431884273-17095-1-git-send-email-genml+zsh-workers@thequod.de> <20150517234642.GI2214@tarsus.local2>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 18.05.2015 01:46, Daniel Shahaf wrote:
> Daniel Hahler wrote on Sun, May 17, 2015 at 19:37:53 +0200:
>> From: Daniel Hahler <git@xxxxxxxxxx>
>>
>> $pipestatus for `: foo` appears to be 0 always.
>> Explicitly declare `$commits` as associative array, and assign it
>> normally.
>
> The change from sequential to associative array breaks __git_recent_commits.
> I assume you should revert the declaration change but keep the
> initialization change.
Thanks for catching that, pushed as suggested.
> Incidentally, _describe's documentation says colons should be escaped,
> so I think we also need something like this:
>
> diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
> index 918f6be..a281597 100644
> --- a/Completion/Unix/Command/_git
> +++ b/Completion/Unix/Command/_git
> @@ -5672,7 +5672,7 @@ __git_recent_commits () {
> for i j k in "$commits[@]" ; do
> # Note: the after-the-colon part must be unique across the entire array;
> # see workers/34768
> - descr+=("$i:[$i] $k")
> + descr+=("$i:[$i] ${k//:/\\:}")
> j=${${j# \(}%\)} # strip leading ' (' and trailing ')'
> for j in ${(s:, :)j}; do
> if [[ $j == 'tag: '* ]] ; then
>
> But I haven't tested this, and in any case I won't commit this until you
> finish pushing your outstanding changes (to avoid conflicts).
Should be good to get committed now - in case it works.
Regards,
Daniel.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iD8DBQFVWrIAfAK/hT/mPgARAnriAKDi3sptg2KRSZVxpNqjtrLsO9skUQCg0ToS
NU8Sc42Gu0K+Xqy5FOkH6Ow=
=dtto
-----END PGP SIGNATURE-----
Messages sorted by:
Reverse Date,
Date,
Thread,
Author