Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] git commit object completion followup
- X-seq: zsh-workers 34739
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] git commit object completion followup
- Date: Thu, 19 Mar 2015 06:49:31 +0000
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=x-sasl-enc:date:from:to:subject:message-id :mime-version:content-type; s=mesmtp; bh=j8ajUXYNsHPj0MtwohSeMmD qeKQ=; b=Yr9PrleLzsE3R1pB7NXeKNHkuvUWCOp5Kfzob6es8LFzb4ncP8D+3NZ gi2rZ1v3RRSg5AHsHCzCzALZ4I/uGF5UeLq9P2jjdhVB+l5854obtqdV81jfPBbM uQk3oeSU13j74+CmyGGrsLF/BLf9bYSOkETv6pJVFYWCtrz9D++8=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:date:from:to:subject :message-id:mime-version:content-type; s=smtpout; bh=j8ajUXYNsHP j0MtwohSeMmDqeKQ=; b=uwoFf+QKLWFQQ9PjuBsNpFB3215BFg8mmeR7LJo08VN +O3/X8fYjyuG/+9A6TxlN7PAxSzhlID7uH0XDUzmSndQaHBvqops/RWgJu+0GGZa rSTWRaCR8wYqFMqe2DsS6G+W/algkSjEHV34uE7jx5cfWGoS2MCkBKTslDcrUFUo =
- 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
This restores the message when completing a commit object name that
isn't one of the most recent 20 commits. e.g., 'git checkout deadbeef<TAB>'.
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index e5639fa..5524cb0 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -5637,7 +5637,7 @@ __git_commit_objects () {
: ${(A)commits::=${(f)"$(_call_program commits git --no-pager log -20 --format='%h:%s')"}}
__git_command_successful $pipestatus || return 1
- _describe -t commits 'commit object name' commits
+ _describe -t commits 'commit object name' commits || _guard '[[:xdigit:]](#c,40)' 'commit object name'
}
(( $+functions[__git_recent_commits] )) ||
Messages sorted by:
Reverse Date,
Date,
Thread,
Author