From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 72dad446 for ; Thu, 7 Mar 2019 23:28:11 +0000 (UTC) Received: (qmail 3309 invoked by alias); 7 Mar 2019 23:27:56 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 44103 Received: (qmail 3331 invoked by uid 1010); 7 Mar 2019 23:27:56 -0000 X-Qmail-Scanner-Diagnostics: from mail-io1-f66.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.100.2/25376. spamassassin: 3.4.2. Clear:RC:0(209.85.166.66):SA:0(-1.9/5.0):. Processed in 2.840798 secs); 07 Mar 2019 23:27:56 -0000 X-Envelope-From: dana@dana.is X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.166.66 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=GmYwLDtbxFpIu/JXa+B6m9H2x8bahyuU2PhfAN40CVM=; b=Oh55RKRuR1duxzFGZ75ye/HMCKDNH8HMg8sC1mF57jJIOnK+tFLbE82cWQbuDKC14S AcjLMxobnIycyBmYyhR9vtHrbrDmyWn8KVyek3xZkybsT5b9l1/UJskDlToOOtgEFvPW Bz+tEPVZ8nc4FP8JzzWyLUXLVa7SlZzv1ckuDL10icRQddIs89b21hpPgcJ/Sjv0Ka08 nFfLw9CtTSmGB86uhNycZ8pWCbF8HfCbU6jMOBwHt0c/wf/N8wBueqpNWkEqubb6n7GF ZI7qMhFyFSoobtapibTA+5I7FCLtNC6EMMqkvaqoQtceHn4Ows8tsRMZCyJC3O1jHPDG YJsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=GmYwLDtbxFpIu/JXa+B6m9H2x8bahyuU2PhfAN40CVM=; b=ncgdBpX4k43g08K8YH/Tsg8kwPQBE1WxYZ3hnQGq1l/BowJTKiY6Av5G5S2mY5pN8u leAtsZENWNLD8sEFStlYy2am7bHgz5D+WhTr2LX3sNBr02DZQV7FMuXtSxU0aCYvqZyh Fe/WlCVKv4elVqVxPkZXgDSEtVWlthStjNSsQNu3Sp2wnKS/g7UztYC30vHGIwlE76MW C7tXQ9L4TGhDM0LyPuPhSvzY1SfM7v8XuvLqTD1pYZFz9vHSWolKhFnVwf5L4eVUBcGS LmXPz4/FSEGVYlfYwMzWUnRXAogi5VhxUpkzlPFHM5EyRZnLSx0rAjaiC9RfWfXpmwTF Qe/Q== X-Gm-Message-State: APjAAAVX8ipmn0NgrojpoLMRWXgkkvHpWPCbJonw4HZQSHhBgXVSJj4i HkVY6kkSI+qN81AweusW+4jJcLpIIEbDIg== X-Google-Smtp-Source: APXvYqwBnmJ0MzcbkcGcLeTyYq+xPHK7YbK34MS8/rKsuV/vKq5qYAiSqoVZpnbRrg68AhgfIzyLzg== X-Received: by 2002:a6b:ec19:: with SMTP id c25mr8017088ioh.169.1552001239264; Thu, 07 Mar 2019 15:27:19 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: Bug in git tab completion: If git.showSignature = true is set globally, tab completion of commits is garbled From: dana In-Reply-To: <20190307192305.GA3173@av.sy.gs> Date: Thu, 7 Mar 2019 17:27:17 -0600 Cc: zsh-workers@zsh.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20190307192305.GA3173@av.sy.gs> To: Adrian Vollmer X-Mailer: Apple Mail (2.3445.9.1) On 7 Mar 2019, at 13:23, Adrian Vollmer wrote: >to reproduce this bug, set showSignature =3D true in the log section of >your global git config file, then type git reset in a git repo >that has a recent signed commit in its history. I guess this is the simple fix for this particular case. `git log` is = called in a few other places, too, but i'm not sure if they're problematic. = Probably are and i just don't know how to trigger it. Maybe it would make sense to do something more robust instead, though? = For example, we could have a __git_call wrapper around _call_program that = always calls git with a safe set of -c options, &c. It'd be a lot of lines = changed, but any further issues like this could be fixed in one place. idk. dana diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index e5e4ee768..796a98fd5 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -6517,7 +6517,7 @@ __git_recent_commits () { =20 # Careful: most %d will expand to the empty string. Quote properly! # NOTE: we could use %D directly, but it's not available in git 1.9.1 = at least. - commits=3D("${(f)"$(_call_program commits git --no-pager log = ${(q)commit_opts} -20 --format=3D'%h%n%d%n%s\ \(%cr\)%n%p')"}") + commits=3D("${(f)"$(_call_program commits git -c = log.showSignature=3Dfalse --no-pager log ${(q)commit_opts} -20 = --format=3D'%h%n%d%n%s\ \(%cr\)%n%p')"}") __git_command_successful $pipestatus || return 1 =20 for i j k parents in "$commits[@]" ; do