Skip to content

Commit 3527211

Browse files
committed
lib/theme.githelpers: unbound varbl
1 parent e88c667 commit 3527211

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

themes/githelpers.theme.bash

+4-4
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,12 @@ function _git-remote-info() {
132132
[[ "${VCS_STATUS_LOCAL_BRANCH:-}" == "${VCS_STATUS_REMOTE_BRANCH:-}" ]] && same_branch_name=true
133133
# no multiple remote support in gitstatusd
134134
if [[ "${SCM_GIT_SHOW_REMOTE_INFO:-}" == "true" || "${SCM_GIT_SHOW_REMOTE_INFO:-}" == "auto" ]]; then
135-
if [[ "${same_branch_name}" != "true" ]]; then
135+
if [[ "${same_branch_name:-}" != "true" ]]; then
136136
remote_info="${VCS_STATUS_REMOTE_NAME}/${VCS_STATUS_REMOTE_BRANCH}"
137137
else
138138
remote_info="${VCS_STATUS_REMOTE_NAME}"
139139
fi
140-
elif [[ ${same_branch_name} != "true" ]]; then
140+
elif [[ ${same_branch_name:-} != "true" ]]; then
141141
remote_info="${VCS_STATUS_REMOTE_BRANCH}"
142142
fi
143143
if [[ -n "${remote_info}" ]]; then
@@ -151,12 +151,12 @@ function _git-remote-info() {
151151
[[ "$(_git-branch)" == "$(_git-upstream-branch)" ]] && same_branch_name=true
152152
if [[ ("${SCM_GIT_SHOW_REMOTE_INFO}" == "auto" && "$(_git-num-remotes)" -ge 2) ||
153153
"${SCM_GIT_SHOW_REMOTE_INFO}" == "true" ]]; then
154-
if [[ "${same_branch_name}" != "true" ]]; then
154+
if [[ "${same_branch_name:-}" != "true" ]]; then
155155
remote_info="\$(_git-upstream)"
156156
else
157157
remote_info="$(_git-upstream-remote)"
158158
fi
159-
elif [[ ${same_branch_name} != "true" ]]; then
159+
elif [[ ${same_branch_name:-} != "true" ]]; then
160160
remote_info="\$(_git-upstream-branch)"
161161
fi
162162
if [[ -n "${remote_info}" ]]; then

0 commit comments

Comments
 (0)