Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH 2/3] vcs_info git: Make sure applied-patches is of the form "$hash $subject" --- that is, has a space and a non-empty second argument --- even with future 'git rebase -i' verbs.
- X-seq: zsh-workers 43588
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH 2/3] vcs_info git: Make sure applied-patches is of the form "$hash $subject" --- that is, has a space and a non-empty second argument --- even with future 'git rebase -i' verbs.
- Date: Tue, 2 Oct 2018 15:20:53 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=jRyr6xeEtioMFDZ3UfNJgb64JNY/e+JZ/nnKv9JAw+c=; b=EdAMJirZ 67mpKX5ESu6rXZGqAv2jhErnc9poILf5gsJiIdgz4/rUqMz4XlnCbLEYz32ZQD0K TvYsJXYZzMi0OP+AnUhxfqLrQLm+M70VzRzxWI6hSEVNDg2O2nR3Z+7v2Z9yZe5H sRYLm7R8rLBKV7VztjdiKINU8V3K/laiIwykaIQrg0B9Td3GhTMVG0a3G1lVJ63H Zp/0p4o05XULKFjxwZWXURydUUWzQZ5DaVOcwevrVVcHMzENHiMfnrpPwAnJCAXy jCkw1uDFoCqFHnI0qjetd2DaUOJpVVz5ttYpB6pfdKZMKcse7yeF7UX4OXDx/6bv GfuYsthucjb3EQ==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=jRyr6xeEtioMFDZ3UfNJgb64JNY/e+JZ/nnKv9JAw+c=; b=YrIW0Uig cM3kFHjd2XMcU1o/ra5T/6qOYWdCU2Jk+xX+wwLjs71Lb48n1zYd24X92wlEjdkt PPiIxBENiKRi0jfq5/2PIcAkgZ9d9GMC6yve3IwURHcEpJQ6SMjswvPsGVQnwbws kpBlc3LTBA0WcgtQHWGws4K65B7fud9lq64g6bqq+vlQzMEBP1yYjMCht/7ysejR WmbSH3GFZikGnuplFvbilhsrdxLucmH8REVkTgZHzD/p4cGIafdtChS1WWDeu+e2 3CzvcJDWJFWUsIYDDXgaH7NrhXFtgoVRGHym75zh0iKmrHqLfmzbMVdRx8jW9bx5 RLGpf5KmC1ctRw==
- In-reply-to: <20181002152054.28358-1-danielsh@tarpaulin.shahaf.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20181002152054.28358-1-danielsh@tarpaulin.shahaf.local2>
Use of '?' is consistent with these precedents:
Backends/VCS_INFO_get_data_git:220: printf -v "git_patches_applied[$p]" "%04d ?" "$p"
Backends/VCS_INFO_get_data_git:242: git_patches_applied+=("? $subject")
Backends/VCS_INFO_get_data_git:244: git_patches_applied+=("?")
VCS_INFO_quilt:160: applied[$i]+=" ?"
VCS_INFO_quilt:168: unapplied[$i]+=" ?"
---
Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
index af7466be5..f38a0d370 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
@@ -202,6 +202,11 @@ elif [[ -d "${gitdir}/rebase-merge" ]]; then
# "$hash $subject", but I hope this counts as making an effort.
p=${p/x /exec }
;;
+ (*)
+ # Forward compatibility with not-yet-existing 'git rebase -i' verbs.
+ if [[ $p != *\ * ]]; then
+ p+=" ?"
+ fi
esac
git_patches_applied+=("$p")
done
Messages sorted by:
Reverse Date,
Date,
Thread,
Author