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
b7e37cea
Commit
b7e37cea
authored
Nov 06, 2019
by
Marc Cornellà
Browse files
Clean up ignore submodules logic in parse_git_dirty
parent
7cc3a32b
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/git.zsh
View file @
b7e37cea
...
@@ -18,16 +18,13 @@ function parse_git_dirty() {
...
@@ -18,16 +18,13 @@ function parse_git_dirty() {
FLAGS+
=
'--untracked-files=no'
FLAGS+
=
'--untracked-files=no'
fi
fi
case
"
$GIT_STATUS_IGNORE_SUBMODULES
"
in
case
"
$GIT_STATUS_IGNORE_SUBMODULES
"
in
""
)
git
)
# if unset: ignore dirty submodules
FLAGS+
=
"--ignore-submodules=dirty"
;;
"git"
)
# let git decide (this respects per-repo config in .gitmodules)
# let git decide (this respects per-repo config in .gitmodules)
;;
;;
*
)
*
)
# if unset: ignore dirty submodules
# other values are passed to --ignore-submodules
# other values are passed to --ignore-submodules
FLAGS+
=
"--ignore-submodules=
$GIT_STATUS_IGNORE_SUBMODULES
"
FLAGS+
=
"--ignore-submodules=
$
{
GIT_STATUS_IGNORE_SUBMODULES
:-
dirty
}
"
;;
;;
esac
esac
STATUS
=
$(
command
git status
${
FLAGS
}
2> /dev/null |
tail
-n1
)
STATUS
=
$(
command
git status
${
FLAGS
}
2> /dev/null |
tail
-n1
)
...
...
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