From 946a99a0b34adc5cbb57fb5e8f3739cc0fcd8ed5 Mon Sep 17 00:00:00 2001 From: m0viefreak Date: Mon, 17 Feb 2014 05:00:36 +0100 Subject: 32396: _git: fix __git_committish_range_{first,last} and __git_is_committish_range - Ranges with 3 dots would always fail, because the non-greedy expansion %..(.|)* in __git_committish_range_first would only remove '..' and never three dots. 'a...b' would end up in 'a.'. Use ${${1%..*}%.} instead. - Use a similar approach for __git_committish_range_last. - Wrap them in another expansion to replace empty results with 'HEAD'. Git man-page states omitted range ending are being replaced with HEAD. This rule has to be followed to make completions like 'git log foo.. -- ' work properly. - Add an additional check to make sure none of the extracted first/last parts contain additional '..' in invalied ranges such as 'a..b..c'. This gets rid of the 'TODO:' and ideally saves a few unneded calls to git rev-parse. --- ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index ef4b622e7..3e6f3e2e2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-02-18 m0viefreak + + * 32396: Completion/Unix/Command/_git: _git: fix + __git_committish_range_{first,last} and __git_is_committish_range + 2014-02-17 Barton E. Schaefer * unposted (users/18468): Doc/Zsh/builtins.yo, Doc/Zsh/params.yo: -- cgit 1.4.1