Use a timeout when doing a git merge in the prompt command.
This commit is contained in:
parent
a997ebb77c
commit
5adad9a874
1 changed files with 1 additions and 1 deletions
2
.bashrc
2
.bashrc
|
|
@ -177,7 +177,7 @@ __git_prompt_command() {
|
|||
[[ "${GIT_REPO_INFO[0]}" == "true" ]] && {
|
||||
# Run prefetch tasks if not disabled.
|
||||
[[ -z "$GIT_DISABLE_PROMPT_PREFETCH" ]] && [[ "$(git config --local --get --type bool script.DisablePromptPrefetch 2>/dev/null)" != "true" ]] && {
|
||||
git maintenance run --task=prefetch 2>/dev/null || {
|
||||
timeout --signal=KILL 7s git maintenance run --task=prefetch 2>/dev/null || {
|
||||
printf "\\033[1;31m%s\\033[0m\\n" "Git maintenance 'prefetch' task failed." >&2
|
||||
return 1
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue