mirror of
https://github.com/zsh-users/zsh
synced 2024-10-01 21:54:34 +00:00
23905: remove useless gitdir assignment and scope array locally in new __git_changed_files function.
This commit is contained in:
parent
79df5a832e
commit
930d43d7af
|
@ -1,5 +1,9 @@
|
|||
2007-10-04 Clint Adams <clint@zsh.org>
|
||||
|
||||
* 23905: Completion/Unix/Command/_git: remove useless gitdir
|
||||
assignment and scope array locally in new __git_changed_files
|
||||
function.
|
||||
|
||||
* Mikael Magnusson: 23903: Completion/Unix/Command/_git:
|
||||
complete both modified and added files for git commit.
|
||||
|
||||
|
|
|
@ -2627,8 +2627,7 @@ __git_unmerged_files () {
|
|||
#this is for git-commit which can take files both git-added and not
|
||||
(( $+functions[__git_changed_files] )) ||
|
||||
__git_changed_files () {
|
||||
gitdir=$(_call_program gitdir git rev-parse --git-dir 2>/dev/null)
|
||||
__git_command_successful || return
|
||||
local -a files
|
||||
|
||||
files=(${(ps:\0:)"$(_call_program files git diff-index -z --name-only HEAD 2>/dev/null)"})
|
||||
__git_command_successful || return
|
||||
|
|
Loading…
Reference in a new issue