Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH 15/16] _git: git rm: make git rm --cached work as intended
- X-seq: zsh-workers 31607
- From: Øystein Walle <oystwa@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH 15/16] _git: git rm: make git rm --cached work as intended
- Date: Sun, 28 Jul 2013 18:22:12 +0200
- Cc: m0viefreak.cm@xxxxxxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :in-reply-to:references; bh=pKv3x3MLXz4WfgGicAahscAPGXW3aJ8bUcHHg/dQkjE=; b=SQEL17uqpp6E+fczbBaGSrKvC8Nb/gicZQJUOnj6QMre/dZyjSMBArAfdAGQ5Ldwps WLzQTYFBDVayDE35polRQzOuA2kQuGF9PafcICPfJ+jYgFBXr5wJHSy1KSEJ2FaDpuW9 HP5q/woFScC7aM9cveFn4ACJH8+DqMEgemUwT62jen5G2qcmpIBmzvju9QG6ykQ/7xXC CD+FPIxAj/asdzFUJN7EOpx1UfO9MoGLlT3xPDx6vGiuOsD3m4GIFuA3VzMr2e15yaC9 31HXxlPDXHewYKJxuMhFj5Klz9AFmXHfeLCIjEq13NFyIw+84Ymz2gM9LXRd+XrBXiRa G5mw==
- In-reply-to: <cover.1375006129.git.oystwa@gmail.com>
- In-reply-to: <cover.1375006129.git.oystwa@gmail.com>
- 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: <cover.1375006129.git.oystwa@gmail.com>
- References: <cover.1375006129.git.oystwa@gmail.com>
From: m0viefreak <m0viefreak.cm@xxxxxxxxxxxxxx>
While limiting the completion to __git_changed-in-index_files
makes perfect sense for "git diff", it is wrong to use for
"git rm", because it prevents it from completing files present in
HEAD. Giving --cached to git rm is supposed to
"just remove it from the index, keep the working tree copy"
and is in no way related to the file needing to be
modified in the index in the first place.
---
Completion/Unix/Command/_git | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 9b15d57..9f133f9 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -1342,11 +1342,7 @@ _git-rm () {
case $state in
(file)
- if [[ -n ${opt_args[(I)--cached]} ]]; then
- __git_changed-in-index_files && ret=0
- else
- __git_cached_files && ret=0
- fi
+ __git_cached_files && ret=0
;;
esac
--
1.8.2.2
Messages sorted by:
Reverse Date,
Date,
Thread,
Author