__git_ps1 extremely slow in kernel tree

前端 未结 6 1173
隐瞒了意图╮
隐瞒了意图╮ 2021-02-01 03:59
$ time __git_ps1
((v2.6.33.4))
real    0m1.467s
user    0m0.864s
sys  0m0.564s

It\'s making my prompt unusable; on the other hand, though, it\'s too us

6条回答
  •  醉梦人生
    2021-02-01 04:57

    to know where exactly this takes time you can do :

    bash -x

    then

    __git_ps1

    Mine was taking time for

    ++ git ls-files --others --exclude-standard
    

    it was listing all the files of my gitted home drectory. even on a fast ssd, it took quite a long time.

提交回复
热议问题