Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH v2 14/14] _git: git rm: make git rm --cached work as intended
- X-seq: zsh-workers 31754
- From: Øystein Walle <oystwa@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH v2 14/14] _git: git rm: make git rm --cached work as intended
- Date: Sun, 22 Sep 2013 12:48:28 +0200
- Cc: m0viefreak <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:in-reply-to:references :in-reply-to:references; bh=yQEDmeNyMD+vCfDVhCza9n3dXLE6tvslmyKCdZW9A14=; b=byWp+jRcrEwCVTPwl0NwqZDk1LZj4VMBAdbjTtyPz9vZjxOKvT82UtOMVXVZRplxwg /I0tJXbcCJg1VF4FliGzI12XEgR3MLWEUa+ee6fNPxeYSFzaMdLCHMe8xXaZZoDaq2XJ 2GLdKKB05CEnlGsUIT8c7jg6/5M7Le32J9Mu/Mzb8uApn/U8YBk6pdxEFyrey92U5eF3 cHxKSNl4Mly5Gkxjp5lgwAhK6VqoaxmRskSrvc6rN+oIGIsXXOI2Y+MD7o29YoFWQ6XS GxCQuIpgzsqD/S3JOy6IxkczjTyGIv+pKDuntTRfFS8S3TPxXXI5UjMwaMGerpr0kOCc Eepg==
- In-reply-to: <cover.1379846744.git.oystwa@gmail.com>
- In-reply-to: <cover.1379846744.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.1379846744.git.oystwa@gmail.com>
- References: <cover.1379846744.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 2dc9ed2..d6f44e6 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -1344,11 +1344,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