Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
79196f82
Commit
79196f82
authored
May 23, 2013
by
Robby Russell
Browse files
Merge pull request #1834 from croach/disable_untracked_files_dirty_fix
Adding a fix for the DISABLE_UNTRACKED_FILES_DIRTY option.
parents
00785384
4ff861ee
Changes
1
Show whitespace changes
Inline
Side-by-side
lib/git.zsh
View file @
79196f82
...
@@ -15,12 +15,12 @@ parse_git_dirty() {
...
@@ -15,12 +15,12 @@ parse_git_dirty() {
if
[[
$POST_1_7_2_GIT
-gt
0
]]
;
then
if
[[
$POST_1_7_2_GIT
-gt
0
]]
;
then
SUBMODULE_SYNTAX
=
"--ignore-submodules=dirty"
SUBMODULE_SYNTAX
=
"--ignore-submodules=dirty"
fi
fi
if
[[
"
$DISABLE_UNTRACKED_FILES_DIRTY
"
!=
"true"
]]
;
then
if
[[
"
$DISABLE_UNTRACKED_FILES_DIRTY
"
==
"true"
]]
;
then
GIT_STATUS
=
$(
git status
-s
${
SUBMODULE_SYNTAX
}
2> /dev/null |
tail
-n1
)
else
GIT_STATUS
=
$(
git status
-s
${
SUBMODULE_SYNTAX
}
-uno
2> /dev/null |
tail
-n1
)
GIT_STATUS
=
$(
git status
-s
${
SUBMODULE_SYNTAX
}
-uno
2> /dev/null |
tail
-n1
)
else
GIT_STATUS
=
$(
git status
-s
${
SUBMODULE_SYNTAX
}
2> /dev/null |
tail
-n1
)
fi
fi
if
[[
-n
$
(
git status
-s
${
SUBMODULE_SYNTAX
}
-uno
2> /dev/null
)
]]
;
then
if
[[
-n
$
GIT_STATUS
]]
;
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
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment