diff options
author | Clint Adams <clint@users.sourceforge.net> | 2007-10-04 08:32:14 +0000 |
---|---|---|
committer | Clint Adams <clint@users.sourceforge.net> | 2007-10-04 08:32:14 +0000 |
commit | 930d43d7afea0274b845ede956a533229f1974c8 (patch) | |
tree | ca47b4ec8471c091d7e796c987f109d9da733bd3 | |
parent | 79df5a832e4a584253cd3b44f4ceaff73089a195 (diff) | |
download | zsh-930d43d7afea0274b845ede956a533229f1974c8.tar.gz zsh-930d43d7afea0274b845ede956a533229f1974c8.tar.xz zsh-930d43d7afea0274b845ede956a533229f1974c8.zip |
23905: remove useless gitdir assignment and scope array locally in new __git_changed_files function.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Completion/Unix/Command/_git | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index f65eca8ce..47a7d47aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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. diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index dfb96558a..3a365e528 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -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 |