git add .<TAB> costs lots of time!! #664

Closed
jinleileiking opened this Issue Oct 18, 2011 · 8 comments

Projects

None yet

6 participants

@jinleileiking

cd /
git init
git add /et # system finding the result, and the harddisk is running.......wait ... wait.... never done...

PS :using the git plugin!

@jinleileiking

archlinux ,gentoo occurs...

@sorin-ionescu

This is an issue with the Git completion. Upgrade your ZSH.

@batizhevsky

ubuntu 11.10, zsh 4.3.11, git add ... 10 minuts... and nothing! no git in plugins used

@jinleileiking

I reproduce this bug today. This buggie is irrelevant to git plugin.

my .zshrc:


# Path to your oh-my-zsh configuration.
export ZSH=$HOME/.oh-my-zsh

# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
export ZSH_THEME="robbyrussell"

# Set to this to use case-sensitive completion
# export CASE_SENSITIVE="true"

# Comment this out to disable weekly auto-update checks
# export DISABLE_AUTO_UPDATE="true"

# Uncomment following line if you want to disable colors in ls
# export DISABLE_LS_COLORS="true"

# Uncomment following line if you want to disable autosetting terminal title.
# export DISABLE_AUTO_TITLE="true"

# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Example format: plugins=(rails git textmate ruby lighthouse)
#plugins=(archlinux bundler extract gnu-utils rails3 redis-cli rvm vundle git rails ruby)
plugins=(archlinux bundler extract gnu-utils rails3 redis-cli rvm vundle rails ruby)

source $ZSH/oh-my-zsh.sh

#export TOOL_PATH=~/tools


#export JAVA_HOME=$TOOL_PATH/jdk1.6.0_25 
#export JRE_HOME=$TOOL_PATH/jdk1.6.0_25/jre 
#export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin 
#export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib:



# Customize to your needs...
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:$PATH
#export PATH=$TOOL_PATH/android-sdk-linux_x86/tools:$TOOL_PATH/android-sdk-linux_x86/platform-tools:$PATH
#export PATH=$TOOL_PATH/jdk1.6.0_25/bin:$PATH
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.

#proxy="http://proxysh.zte.com.cn:80"
#proxy="http://proxynj.zte.com.cn:80"

#export http_proxy=$proxy
#export https_proxy=$proxy
#export ftp_proxy=$proxy

set -o vi

PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting

➜  ~ git:(master) ✗ eix zsh$
[I] app-shells/zsh
     Available versions:  4.3.11-r1 4.3.12 4.3.15 ~4.3.17 {caps debug doc examples gdbm maildir pcre static unicode}
     Installed versions:  4.3.15(11:47:51 PM 02/27/2012)(gdbm pcre unicode -caps -debug -doc -examples -maildir -static)
     Homepage:            http://www.zsh.org/
     Description:         UNIX Shell similar to the Korn shell
~ git:(master) ✗ uname -a
Linux vm 3.2.1-gentoo-r2 #2 SMP Mon Feb 27 03:31:05 Local time zone must be set--see zic  i686 Intel(R) Core(TM) i3 CPU M 370 @ 2.40GHz GenuineIntel GNU/Linux
@jinleileiking

REPRODUCE:


➜  ~ git:(master) ✗ cd 
➜  ~ git:(master) ✗ pwd
/home/jinleileiking
➜  ~ git:(master) ✗ ls -la
total 616
drwxr-xr-x 22 jinleileiking jinleileiking  4096 Mar 12 16:26 .
drwxr-xr-x  3 jinleileiking jinleileiking  4096 Feb 28 05:26 ..
lrwxrwxrwx  1 jinleileiking jinleileiking    45 Mar  6 16:47 1600 -> /mnt/win7/Work/Project/1600/src/V02.00.00-dev
drwxr-xr-x  9 jinleileiking jinleileiking  4096 Mar  9 15:13 awesome-dotfiles
-rw-------  1 jinleileiking jinleileiking  9199 Mar 12 13:10 .bash_history
-rw-r--r--  1 jinleileiking jinleileiking   127 Feb 22 06:26 .bash_logout
-rw-r--r--  1 jinleileiking jinleileiking   193 Feb 22 06:26 .bash_profile
-rw-r--r--  1 jinleileiking jinleileiking   610 Feb 28 14:01 .bashrc
drwxr-xr-x  2 jinleileiking jinleileiking  4096 Feb 28 16:17 .bundle
drwxr-xr-x  7 jinleileiking jinleileiking  4096 Mar  1 14:06 .cache
drwxr-xr-x 10 jinleileiking jinleileiking  4096 Mar  1 14:06 .config
-rw-r--r--  1 jinleileiking jinleileiking  8565 Feb 28 05:43 .conkyrc
-rw-r--r--  1 jinleileiking jinleileiking    68 Feb 28 05:43 .ctags
drwx------  3 jinleileiking jinleileiking  4096 Feb 29 10:22 .dbus
drwx------  2 jinleileiking jinleileiking  4096 Mar  9 15:12 Downloads
-rw-r--r--  1 jinleileiking jinleileiking    80 Mar 12 13:12 .fehbg
-rw-r--r--  1 jinleileiking jinleileiking  3520 Mar  6 10:08 .fonts.conf
-rw-r--r--  1 jinleileiking jinleileiking  6341 Mar  6 10:08 ..fonts.conf.un~
drwx------  3 jinleileiking jinleileiking  4096 Mar 12 16:18 .gconf
drwx------  2 jinleileiking jinleileiking  4096 Mar 12 16:19 .gconfd
drwxr-xr-x  3 jinleileiking jinleileiking  4096 Feb 28 16:05 .gem
-rw-r--r--  1 jinleileiking jinleileiking   189 Mar 12 11:59 Gemfile
-rw-r--r--  1 jinleileiking jinleileiking  1924 Feb 29 10:07 Gemfile.lock
-rw-r--r--  1 jinleileiking jinleileiking  6350 Mar 12 11:59 .Gemfile.un~
drwxr-xr-x  7 jinleileiking jinleileiking  4096 Mar 12 16:26 .git
-rw-r--r--  1 jinleileiking jinleileiking   144 Mar 12 11:56 .gitconfig
-rw-r--r--  1 jinleileiking jinleileiking    17 Mar  9 15:23 .gitignore
drwx------  3 jinleileiking jinleileiking  4096 Mar  2 16:32 .gnome2
drwx------  2 jinleileiking jinleileiking  4096 Mar  1 10:21 .gnome2_private
-rw-r--r--  1 jinleileiking jinleileiking    91 Feb 28 05:43 .irbrc
drwxr-xr-x  2 jinleileiking jinleileiking  4096 Feb 28 05:43 .irssi
-rw-------  1 jinleileiking jinleileiking    55 Mar  5 10:11 .lesshst
-rw-r--r--  1 jinleileiking jinleileiking   104 Mar 12 10:03 .NERDTreeBookmarks
drwxr-xr-x 10 jinleileiking jinleileiking  4096 Feb 28 14:08 .oh-my-zsh
drwx------  3 jinleileiking jinleileiking  4096 Feb 28 09:40 .pki
-rwxr-xr-x  1 jinleileiking jinleileiking   183 Feb 29 08:51 prebundle.sh
-rwxr-xr-x  1 jinleileiking jinleileiking  6983 Feb 29 08:51 .prebundle.sh.un~
-rwxr-xr-x  1 jinleileiking jinleileiking   820 Feb 28 05:43 proxy.sh
drwxr-xr-x 24 jinleileiking jinleileiking  4096 Feb 28 15:50 .rvm
-rw-------  1 jinleileiking jinleileiking   141 Mar 12 16:18 .serverauth.1965
-rw-------  1 jinleileiking jinleileiking   141 Mar  1 15:44 .serverauth.1981
-rw-------  1 jinleileiking jinleileiking   141 Mar  5 14:13 .serverauth.1984
-rw-------  1 jinleileiking jinleileiking   141 Mar  6 10:06 .serverauth.1987
-rw-------  1 jinleileiking jinleileiking   141 Feb 29 12:55 .serverauth.2000
-rw-------  1 jinleileiking jinleileiking   141 Feb 28 17:13 .serverauth.2048
-rw-------  1 jinleileiking jinleileiking   141 Feb 29 08:36 .serverauth.2199
-rw-------  1 jinleileiking jinleileiking   141 Mar  6 15:22 .serverauth.2206
-rw-------  1 jinleileiking jinleileiking    94 Mar  1 08:54 .serverauth.2215
-rw-------  1 jinleileiking jinleileiking   141 Mar  2 09:13 .serverauth.2218
-rw-------  1 jinleileiking jinleileiking   141 Mar  8 09:22 .serverauth.2219
-rw-------  1 jinleileiking jinleileiking   141 Mar  6 09:00 .serverauth.2226
-rw-------  1 jinleileiking jinleileiking   141 Feb 28 13:23 .serverauth.2234
-rw-------  1 jinleileiking jinleileiking   141 Mar  2 14:03 .serverauth.2260
-rw-------  1 jinleileiking jinleileiking   141 Mar  9 15:06 .serverauth.22937
-rw-------  1 jinleileiking jinleileiking   141 Mar 12 09:22 .serverauth.2296
-rw-------  1 jinleileiking jinleileiking   141 Mar  9 17:13 .serverauth.2305
-rw-------  1 jinleileiking jinleileiking   141 Feb 29 08:39 .serverauth.2333
-rw-------  1 jinleileiking jinleileiking   141 Mar  7 15:00 .serverauth.2441
-rw-------  1 jinleileiking jinleileiking   141 Feb 29 16:29 .serverauth.2447
-rw-------  1 jinleileiking jinleileiking    94 Feb 28 16:03 .serverauth.2471
-rw-------  1 jinleileiking jinleileiking   141 Mar  9 11:55 .serverauth.2988
-rw-------  1 jinleileiking jinleileiking   141 Mar  9 09:48 .serverauth.3758
-rw-------  1 jinleileiking jinleileiking   141 Mar  8 12:59 .serverauth.6528
drwx------  2 jinleileiking jinleileiking  4096 Feb 22 10:05 .ssh
drwx------  2 jinleileiking jinleileiking  4096 Mar 12 15:07 .sunpinyin
-rw-------  1 jinleileiking jinleileiking 12288 Mar  2 16:32 .swm
-rw-------  1 jinleileiking jinleileiking 12288 Feb 28 13:21 .swn
-rw-------  1 jinleileiking jinleileiking     0 Feb 28 12:44 .swo
-rw-------  1 jinleileiking jinleileiking 12288 Feb 28 12:45 .swp
drwx------  4 jinleileiking jinleileiking  4096 Feb 28 15:41 .thumbnails
-rw-r-----  1 jinleileiking jinleileiking     5 Mar 12 16:18 .vboxclient-clipboard.pid
-rw-r-----  1 jinleileiking jinleileiking     5 Mar 12 16:18 .vboxclient-display.pid
-rw-r-----  1 jinleileiking jinleileiking     5 Mar 12 16:18 .vboxclient-seamless.pid
drwxr-xr-x  3 jinleileiking jinleileiking  4096 Feb 28 13:44 .vim
-rw-------  1 jinleileiking jinleileiking 10633 Mar 12 16:17 .viminfo
-rw-r--r--  1 jinleileiking jinleileiking  9679 Mar 12 10:02 .vimrc
-rw-r--r--  1 jinleileiking jinleileiking 88333 Mar 12 10:02 ..vimrc.un~
-rw-r--r--  1 jinleileiking jinleileiking   332 Feb 28 05:43 .wgetrc.example
-rw-------  1 jinleileiking jinleileiking   194 Mar  1 08:54 .Xauthority
-rw-r--r--  1 jinleileiking jinleileiking  1007 Mar  8 12:58 .xinitrc
-rw-r--r--  1 jinleileiking jinleileiking   871 Feb 28 05:43 .xinitrc.example
-rw-r--r--  1 jinleileiking jinleileiking 12288 Mar  8 12:58 .xinitrc.swp
-rw-r--r--  1 jinleileiking jinleileiking  3251 Mar  8 12:58 ..xinitrc.un~
-rw-r--r--  1 jinleileiking jinleileiking    90 Mar  6 10:05 .Xresources
-rw-r--r--  1 jinleileiking jinleileiking 12530 Mar 12 16:22 yankring_history_v2.txt
-rw-r--r--  1 jinleileiking jinleileiking 33907 Feb 28 16:03 .zcompdump
-rw-------  1 jinleileiking jinleileiking 63437 Mar 12 16:26 .zsh_history
-rw-r--r--  1 jinleileiking jinleileiking  1865 Mar 12 16:17 .zshrc
-rw-r--r--  1 jinleileiking jinleileiking  2737 Mar 12 16:17 ..zshrc.un~
-rw-r--r--  1 jinleileiking jinleileiking    17 Feb 28 16:03 .zsh-update
➜  ~ git:(master) ✗ git add .

ZSH HANGED !!!!!

@jinleileiking
cd /
git add et<TAB>

IS OKAY!

@gildo

Also affects git log.

git log <tab>

takes 30 seconds and CPU at 99%

(Arch Linux here)

@skippednote

Facing the same issue when trying select a directory or file
git diff template will take atleast 30s+

Right now latest ZSH downloaded via brew and vanilla zshrc without any git plugins

@robbyrussell robbyrussell added the git label Mar 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment