Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] _git: Quote the return value of __git_committish_range{first,last}
- X-seq: zsh-workers 36123
- From: Wieland Hoffmann <themineo@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] _git: Quote the return value of __git_committish_range{first,last}
- Date: Wed, 12 Aug 2015 11:36:17 +0200
- Cc: Wieland Hoffmann <themineo@xxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=X4+4GuL7bCyX6vN/VXLHOeTs74K9uJDGUtIDx1xnXgw=; b=l9aK2HxHMWla0OdLx/9cvCX3Q1hZJDwW4XBSnSn+r1mG64xjSn5sJ8c83YiG9WpcNl 35HLwrIiM56MCSttYI+I/IYlnH9EEWZ6O22wgCkJkt/ajYtS+JUdeJfhlpuMhL9x6HaT CSrOPe3miOBNnNjDnIzggdKxavzd/ouqV61jto/bY5FH7/PTcE7dJq+3CPeSkOTqB4Qp BFTiawN7/PgJbz45oPIYkE9Pqp+l2rccpodrF0VBAxxoHxe3BIuzGhqD/PrF+MoslwDc 92w/Z4DyluOwgCb7b1Q4bc7rViXqxgRYbxVt/w8WzjHtnCfU9JJWEkEl9U580HdsYoV7 gyXg==
- 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
Otherwise, __git_is_committish_range performs word splitting if it's
passed a range that includes spaces (like "master@{1 week ago}..master").
---
Completion/Unix/Command/_git | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 5b78a2b..f5dbbae 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -4973,8 +4973,8 @@ __git_is_treeish () {
(( $+functions[__git_is_committish_range] )) ||
__git_is_committish_range () {
[[ $1 == *..(.|)* ]] || return 1
- local first=$(__git_committish_range_first $1)
- local last=$(__git_committish_range_last $1)
+ local first="$(__git_committish_range_first $1)"
+ local last="$(__git_committish_range_last $1)"
[[ $first != *..* && $last != *..* ]] && \
__git_is_committish $first && \
__git_is_committish $last
--
2.5.0
Messages sorted by:
Reverse Date,
Date,
Thread,
Author