Use SIGKILL for stopping long git jobs.

This commit is contained in:
Darren 'Tadgy' Austin 2023-10-20 20:29:01 +01:00
commit 3c247cab15

View file

@ -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