summaryrefslogtreecommitdiff
path: root/gitstatus/gitstatus.plugin.zsh
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-08-20 21:28:27 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-08-20 21:28:27 +0300
commitc1acb62cf4aab3b30633839430d362293fc8a702 (patch)
treeec1a7d3f0c031108b47bbfed8542c5a9e84ec0d5 /gitstatus/gitstatus.plugin.zsh
parente537a0ee628341741f20a7d2d96ea1c4fac74c4a (diff)
pull upstream changes from gitstatus
Diffstat (limited to 'gitstatus/gitstatus.plugin.zsh')
-rw-r--r--gitstatus/gitstatus.plugin.zsh10
1 files changed, 8 insertions, 2 deletions
diff --git a/gitstatus/gitstatus.plugin.zsh b/gitstatus/gitstatus.plugin.zsh
index 7faa196c..244c34e5 100644
--- a/gitstatus/gitstatus.plugin.zsh
+++ b/gitstatus/gitstatus.plugin.zsh
@@ -264,6 +264,8 @@ function _gitstatus_process_response() {
#
# -m INT If a repo has more files in its index than this, override -u and -d (but not -s)
# with zeros. Negative value means infinity. Defaults to -1.
+#
+# -e Count files within untracked directories like `git status --untracked-files`.
function gitstatus_start() {
emulate -L zsh
setopt err_return no_unset no_bg_nice
@@ -275,8 +277,9 @@ function gitstatus_start() {
local -i max_num_conflicted=1
local -i max_num_untracked=1
local -i dirty_max_index_size=-1
+ local recurse_untracked_dirs
while true; do
- getopts "t:s:u:c:d:m:" opt || break
+ getopts "t:s:u:c:d:m:e" opt || break
case $opt in
t) timeout=$OPTARG;;
s) max_num_staged=$OPTARG;;
@@ -284,6 +287,8 @@ function gitstatus_start() {
c) max_num_conflicted=$OPTARG;;
d) max_num_untracked=$OPTARG;;
m) dirty_max_index_size=$OPTARG;;
+ e) recurse_untracked_dirs='--recurse-untracked-dirs';;
+ +e) recurse_untracked_dirs=;;
?) return 1;;
esac
done
@@ -349,7 +354,8 @@ function gitstatus_start() {
--max-num-conflicted=${(q)max_num_conflicted}
--max-num-untracked=${(q)max_num_untracked}
--dirty-max-index-size=${(q)dirty_max_index_size}
- ${${log_level:#INFO}:+--log-level=$log_level})
+ --log-level=${(q)log_level}
+ $recurse_untracked_dirs)
local cmd="
echo \$\$