Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] More git completion tweaks
- X-seq: zsh-workers 34885
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] More git completion tweaks
- Date: Mon, 13 Apr 2015 20:44:55 +0000
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=IxM 9cEJ6/kzhXvyIZVhcj7JsKNA=; b=JAYK3cTb1ji5CxODVWzaUIvmM3/vpfLUzBP wWMobvjDe/WTswj2C/SRljCSPIuEmnTcYeopfU8bxgvjkeGtstZqbvDF84YHtWV2 t6C42U816CSDXwSj+cM/RPRn+WuhWHQk2sWaaf9uE0xDJIVzz6FqHtOAEovsHs86 tZm8Y31Y=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=Ix M9cEJ6/kzhXvyIZVhcj7JsKNA=; b=q1Cqk94B3GEpjAQREl3m51TgFAOVVbHhaR ZsmgCUTOIuh0DeAg9CPn7o2RydxIqGHkQzwoYtEo+/0XAN6w2EpSHgvD0L3LnSYc /ddTVDDfuGqTScOBKUczB1qjsHfvz4LwQqTiuULCGBDIfSNoPAwnmzeGO9+RRVEe qoZF0wlrE=
- 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
Attached.
From dd90cd4f36b9b907cda588b09ecbbd2737fecd70 Mon Sep 17 00:00:00 2001
From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
Date: Sat, 11 Apr 2015 10:13:55 +0000
Subject: [PATCH 1/2] completion: git: Fix another instance of the 34671 bug
fixed in 34814
---
Completion/Unix/Command/_git | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index b11c83c..365482c 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -5634,7 +5634,9 @@ __git_commit_objects () {
local gitdir expl start
declare -a commits
- : ${(A)commits::=${(f)"$(_call_program commits git --no-pager log -20 --format='%h:%s')"}}
+ # Note: the after-the-colon part must be unique across the entire array;
+ # see workers/34768
+ : ${(A)commits::=${(f)"$(_call_program commits git --no-pager log -20 --format='%h:\\\[%h\\\]\ %s')"}}
__git_command_successful $pipestatus || return 1
_describe -t commits 'commit object name' commits || _guard '[[:xdigit:]](#c,40)' 'commit object name'
--
1.9.1
From ab6a61fb2e59a64add6e6d9f24a9efd9ed01726f Mon Sep 17 00:00:00 2001
From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
Date: Thu, 2 Apr 2015 13:28:58 +0000
Subject: [PATCH 2/2] completion: git: Sort "commit object" completions most
recent first
---
Completion/Unix/Command/_git | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 365482c..6a2da17 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -5639,7 +5639,7 @@ __git_commit_objects () {
: ${(A)commits::=${(f)"$(_call_program commits git --no-pager log -20 --format='%h:\\\[%h\\\]\ %s')"}}
__git_command_successful $pipestatus || return 1
- _describe -t commits 'commit object name' commits || _guard '[[:xdigit:]](#c,40)' 'commit object name'
+ _describe -V -t commits 'commit object name' commits || _guard '[[:xdigit:]](#c,40)' 'commit object name'
}
(( $+functions[__git_recent_commits] )) ||
--
1.9.1
Messages sorted by:
Reverse Date,
Date,
Thread,
Author