From e626f57613ad2dacd7fe7244f6a33de5c8f03f9e Mon Sep 17 00:00:00 2001 From: Eitan Adler Date: Sun, 19 Jan 2020 21:31:56 +0000 Subject: 45332: _git: add completion for git-version Signed-off-by: Eitan Adler --- Completion/Unix/Command/_git | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_git') diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 7f2c206c1..ba1852699 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -407,6 +407,12 @@ _git-bundle () { return ret } +(( $+functions[_git-version] )) || +_git-version () { + _arguments -S $endopt \ + '--build-options[also print build options]' +} + (( $+functions[_git-check-ignore] )) || _git-check-ignore () { _arguments -s -S $endopt \ @@ -5951,7 +5957,8 @@ _git_commands () { show-branch:'show branches and their commits' verify-commit:'check GPG signature of commits' verify-tag:'check GPG signature of tags' - whatchanged:'show commit-logs and differences they introduce') + whatchanged:'show commit-logs and differences they introduce' + version:'show git version') interaction_commands=( archimport:'import an Arch repository into git' -- cgit 1.4.1 From e71ba9704f86a4a3ec1f0ddabbb1f2296fe421fe Mon Sep 17 00:00:00 2001 From: WGH Date: Sun, 2 Feb 2020 07:31:36 +0000 Subject: 45365: _git: Fix __git_recent_branches for the case when a commit has an empty message --- ChangeLog | 5 +++++ Completion/Unix/Command/_git | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'Completion/Unix/Command/_git') diff --git a/ChangeLog b/ChangeLog index 95a94db07..698e21592 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2020-02-02 WGH + + * 45365: Completion/Unix/Command/_git: Fix __git_recent_branches + for the case when a commit has an empty message + 2020-01-29 Daniel Shahaf * 45343: Src/exec.c, Src/math.c: Queue signals around arithmetic diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index ba1852699..97ab26512 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -6662,8 +6662,8 @@ __git_recent_branches() { # 4. Obtain log messages for all of them in one shot. # TODO: we'd really like --sort=none here... but git doesn't support such a thing. - # The \n removal is because for-each-ref prints a \n after each entry. - descriptions=( ${(0)"$(_call_program all-descriptions "git --no-pager for-each-ref --format='%(refname)%00%(subject)%00'" refs/heads/${(q)^branches} "--")"//$'\n'} ) + local z=$'\0' + descriptions=( "${(0)"$(_call_program all-descriptions "git --no-pager for-each-ref --format='%(refname)%00%(subject)'" refs/heads/${(q)^branches} "--")"//$'\n'/$z}" ) # 5. Synthesize the data structure _describe wants. local -a branches_colon_descriptions -- cgit 1.4.1