diff options
author | memeplex <memeplex@web> | 2017-04-14 22:11:55 +0000 |
---|---|---|
committer | admin <admin@branchable.com> | 2017-04-14 22:11:55 +0000 |
commit | fdd50fc4d77e4895545e442f00871c6a2ca7be4d (patch) | |
tree | c02d8c0d05da0d9322a12170cf6f997c3e92955f /doc/tips | |
parent | 5f450f7b514f7eaedd68b6d988b1b10baf78bfd9 (diff) |
Diffstat (limited to 'doc/tips')
-rw-r--r-- | doc/tips/Faster_bash_autocompletion_with_big_annex_repos.mdwn | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/doc/tips/Faster_bash_autocompletion_with_big_annex_repos.mdwn b/doc/tips/Faster_bash_autocompletion_with_big_annex_repos.mdwn index ded86df72..61d49192c 100644 --- a/doc/tips/Faster_bash_autocompletion_with_big_annex_repos.mdwn +++ b/doc/tips/Faster_bash_autocompletion_with_big_annex_repos.mdwn @@ -25,26 +25,26 @@ __git_index_files () time __git_index_files > /dev/null +real 0m0.830s +user 0m0.597s +sys 0m0.310s __git_index_files () { local dir="$(__gitdir)" root="${2-.}" file; if [ -d "$dir" ]; then __git_ls_files_helper "$root" "$1" | \ - sed -r 's@^"?([^/]+)/.*$@\1@' | sort | uniq + sed -r 's@/.*@@' | uniq | sort | uniq fi } + time __git_index_files > /dev/null -real 0m0.830s -user 0m0.597s -sys 0m0.310s +real 0m0.075s +user 0m0.083s +sys 0m0.010s -real 0m0.345s -user 0m0.357s -sys 0m0.000s ``` -So you might redefine `__git_index_files` as above in your .bashrc after sourcing the git autocomplete script. - +10 times faster! So you might redefine `__git_index_files` as above in your .bashrc after sourcing the git autocomplete script. |