Use SIGKILL for stopping long git jobs.
This commit is contained in:
parent
42ba53f0f8
commit
3c247cab15
1 changed files with 4 additions and 4 deletions
8
.bashrc
8
.bashrc
|
@ -112,9 +112,9 @@ __prompt_git_status() {
|
|||
GIT_PROMPT_MARKER_SET=1
|
||||
}
|
||||
[[ -z "$GIT_PROMPT_MARKER_SET" ]] && [[ -n "$GIT_PROMPT_SHOW_UNSTAGED" ]] && {
|
||||
timeout 2s git ls-files --modified --exclude-standard --directory --error-unmatch -- ':/*' >/dev/null 2>&1
|
||||
timeout --signal=KILL 2s git ls-files --modified --exclude-standard --directory --error-unmatch -- ':/*' >/dev/null 2>&1
|
||||
ERR=$?
|
||||
if (( ERR == 124 )); then
|
||||
if (( ERR == 124 )) || (( ERR == 137 )); then
|
||||
GIT_PROMPT+=" _"
|
||||
GIT_PROMPT_MARKER_SET=1
|
||||
elif (( ERR == 0 )); then
|
||||
|
@ -127,9 +127,9 @@ __prompt_git_status() {
|
|||
GIT_PROMPT_MARKER_SET=1
|
||||
}
|
||||
[[ -z "$GIT_PROMPT_MARKER_SET" ]] && [[ -n "$GIT_PROMPT_SHOW_UNTRACKED" ]] && {
|
||||
timeout 2s git ls-files git ls-files --others --exclude-standard --directory --error-unmatch -- ':/*' >/dev/null 2>&1
|
||||
timeout --signal=KILL 2s git ls-files git ls-files --others --exclude-standard --directory --error-unmatch -- ':/*' >/dev/null 2>&1
|
||||
ERR=$?
|
||||
if (( ERR == 124 )); then
|
||||
if (( ERR == 124 )) || (( ERR == 137 )); then
|
||||
GIT_PROMPT+=" _"
|
||||
GIT_PROMPT_MARKER_SET=1
|
||||
elif (( ERR == 0 )); then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue