#34 - Increased max changes before falling back to standard git status, from 99 to 150. Also added a explanation message that is shown after the regular git status.

This commit is contained in:
Nathan Broadbent
2012-08-13 01:21:23 +12:00
parent 989b2233b7
commit 3a507fbd5a
2 changed files with 5 additions and 3 deletions

View File

@@ -4,8 +4,8 @@
# - Set your preferred prefix for env variable file shortcuts. # - Set your preferred prefix for env variable file shortcuts.
# (I chose 'e' because it is easy to slide your finger to it from '$'.) # (I chose 'e' because it is easy to slide your finger to it from '$'.)
export git_env_char="e" export git_env_char="e"
# - Max changes before reverting to 'git status'. git_status_shortcuts() may slow down for lots of changes. # - Max changed files before reverting to 'git status'. git_status_shortcuts() will be slower for lots of changed files.
export gs_max_changes="99" export gs_max_changes="150"
# - When using the git_add_shorcuts() command, automatically invoke 'git rm' to remove deleted files? # - When using the git_add_shorcuts() command, automatically invoke 'git rm' to remove deleted files?
export ga_auto_remove="yes" export ga_auto_remove="yes"

View File

@@ -27,7 +27,9 @@ git_status_shortcuts() {
fi fi
if [[ -z "$cmd_output" ]]; then if [[ -z "$cmd_output" ]]; then
# Just show regular git status if ruby script returns nothing. # Just show regular git status if ruby script returns nothing.
git status; return 1 git status
echo -e "\n\e[33mThere were more than $gs_max_changes changed files. SCM Breeze has fallen back to standard \`git status\` for performance reasons.\e[0m"
return 1
fi fi
# Fetch list of files from last line of script output # Fetch list of files from last line of script output
files="$(echo "$cmd_output" | \grep '@@filelist@@::' | sed 's%@@filelist@@::%%g')" files="$(echo "$cmd_output" | \grep '@@filelist@@::' | sed 's%@@filelist@@::%%g')"