zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Hahler <genml+zsh-workers@thequod.de>
To: Zsh Hackers' List <zsh-workers@zsh.org>
Subject: Re: [PATCH] completion: git: fix __git_commit_objects/__git_recent_commits
Date: Tue, 19 May 2015 05:46:08 +0200	[thread overview]
Message-ID: <555AB200.5050106@thequod.de> (raw)
In-Reply-To: <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@thequod.de>
>>
>> $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-----


  reply	other threads:[~2015-05-19  3:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-17 17:37 Daniel Hahler
2015-05-17 17:57 ` Daniel Hahler
2015-05-17 23:46 ` Daniel Shahaf
2015-05-19  3:46   ` Daniel Hahler [this message]
2015-05-19  4:42     ` Bart Schaefer

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

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

  git send-email \
    --in-reply-to=555AB200.5050106@thequod.de \
    --to=genml+zsh-workers@thequod.de \
    --cc=zsh-workers@zsh.org \
    /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://git.vuxu.org/mirror/zsh/

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 NNTP newsgroup(s).