浏览代码

Ignore submodules dirty in prompt info

julien@macbook 13 年之前
父节点
当前提交
dd14e075b7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/git.zsh

+ 1 - 1
lib/git.zsh

@@ -6,7 +6,7 @@ function git_prompt_info() {
 
 
 # Checks if working tree is dirty
 # Checks if working tree is dirty
 parse_git_dirty() {
 parse_git_dirty() {
-  if [[ -n $(git status -s 2> /dev/null) ]]; then
+  if [[ -n $(git status -s --ignore-submodules=dirty 2> /dev/null) ]]; then
     echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
     echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
   else
   else
     echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
     echo "$ZSH_THEME_GIT_PROMPT_CLEAN"