Do prefetch in any part of repo, not just the root.
This commit is contained in:
parent
9f60a6fde1
commit
42ba53f0f8
1 changed files with 1 additions and 2 deletions
3
.bashrc
3
.bashrc
|
@ -66,8 +66,7 @@ __prompt_git_status() {
|
|||
# Add upstream status.
|
||||
[[ -n "$GIT_PROMPT_SHOW_UPSTREAM" ]] || [[ -n "$GIT_PROMPT_SHOW_UPSTREAM_EXTENDED" ]] && {
|
||||
# Whether to run prefetch tasks.
|
||||
[[ -n "$GIT_PROMPT_AUTO_PREFETCH" ]] && [[ "$PWD" == "${GIT_REPO_INFO[0]}" ]] && \
|
||||
[[ "$(git config --get --bool maintenance.promptprefetchdisabled 2>/dev/null)" != "true" ]] && {
|
||||
[[ -n "$GIT_PROMPT_AUTO_PREFETCH" ]] && [[ "$(git config --get --bool maintenance.promptprefetchdisabled 2>/dev/null)" != "true" ]] && {
|
||||
git maintenance run --task=prefetch 2>/dev/null || printf "\\033[1;31m%s\\033[39m\\n" "Git maintenance 'prefetch' task failed." >&2
|
||||
}
|
||||
COUNT="$(git rev-list --count --left-right "${BRANCH:+refs/prefetch/remotes/origin/}${BRANCH:-@{upstream\}}...HEAD" 2>/dev/null | tr '[:blank:]' ' ')"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue