__git_ps1 extremely slow in kernel tree

前端 未结 6 1172
隐瞒了意图╮
隐瞒了意图╮ 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:40

    Does the repo have submodules? See the remark regarding "git status is now very slow" (with submodules) in this post, due to a change introduced in 1.7.0:

    The fix/work-around is to pass "--ignore-submodules" to "git status", as noted in the update below the section: "Update: Thanks to VonC, who points out in the comments below that in git 1.7.2 there is now a “–ignore-submodules” option to git status which can restore the old behaviour and also provides the useful option that only changed files (not untracked files) cause the submodule to be shown as dirty."

提交回复
热议问题