Skip to content

Commit bcc4669

Browse files
committed
Potential fix for unbound variable error using $GIT_REFLOG_ACTION (issue #150)
1 parent ca6a467 commit bcc4669

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

transcrypt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ git_merge() {
261261
# Look up name of the incoming "theirs" branch/ref being merged in.
262262
# TODO There must be a better way of doing this than relying on this reflog
263263
# action environment variable, but I don't know what it is
264-
if [[ "$GIT_REFLOG_ACTION" = "merge "* ]]; then
264+
if [[ "${GIT_REFLOG_ACTION:-}" = "merge "* ]]; then
265265
THEIRS_LABEL=$(echo "$GIT_REFLOG_ACTION" | awk '{print $2}')
266266
fi
267267
if [[ ! "$THEIRS_LABEL" ]]; then

0 commit comments

Comments
 (0)