Update to show the subject if the body is empty

pull/1280/head
Travis Swicegood 2018-12-02 10:47:37 -06:00
parent 8e7a566d96
commit 185c2879d5
1 changed files with 10 additions and 1 deletions

View File

@ -181,7 +181,16 @@ _bash-it_update() {
status="$(git rev-list master..${BASH_IT_REMOTE}/master 2> /dev/null)"
if [[ -n "${status}" ]]; then
git log --merges --format="%h: %b (%an)" master..${BASH_IT_REMOTE}/master
for i in $(git rev-list --merges master..${BASH_IT_REMOTE}); do
num_of_lines=$(git log -1 --format=%B $i | awk 'NF' | wc -l)
if [ $num_of_lines -eq 1 ]; then
description="%s"
else
description="%b"
fi
git log --format="%h: $description (%an)" -1 $i
done
echo ""
read -e -n 1 -p "Would you like to update to $(git log -1 --format=%h origin/master)? [Y/n] " RESP
case $RESP in