Skip to content

Commit b950941

Browse files
authored
Merge pull request #2139 from tbhaxor/patch-3
Improve bashit upgrade function git log and add missing popd
2 parents 1ffbc85 + 6ccd9f5 commit b950941

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/helpers.bash

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ function _bash-it-update-() {
290290
DIFF=$(git diff --name-status)
291291
if [[ -n "$DIFF" ]]; then
292292
echo -e "Local changes detected in bash-it directory. Clean '$BASH_IT' directory to proceed.\n$DIFF"
293+
popd > /dev/null || return
293294
return 1
294295
fi
295296

@@ -334,7 +335,7 @@ function _bash-it-update-() {
334335
log_color="%Cred"
335336
fi
336337

337-
git log --format="${log_color}%h: %s (%an)" "${revision}"
338+
git log --no-merges --format="${log_color}%h: %s (%an)" "${revision}"
338339
echo ""
339340

340341
if [[ -n "${silent}" ]]; then

0 commit comments

Comments
 (0)