]> arthur.barton.de Git - ax-zsh.git/commitdiff
axzshctl: Bring Git updates in line and show logs
authorAlexander Barton <alex@barton.de>
Sun, 17 Jan 2021 18:53:00 +0000 (19:53 +0100)
committerAlexander Barton <alex@barton.de>
Sun, 17 Jan 2021 18:53:04 +0000 (19:53 +0100)
Bring Git update commands for AX-ZSH and plugins in line (same error
handling), and show one-line summaries of commits pulled in.

bin/axzshctl

index c8aaf7da3e03cb62ad31223a8c81da759e80d35e..b958950d2ad313863d668271d6b9d9e12a823254 100755 (executable)
@@ -296,7 +296,12 @@ function UpgradeAXZSH {
        fi
 
        ax_msg - "Upgrading AX-ZSH in \"$AXZSH\" using git(1) ..."
-       ( cd "$AXZSH" && git pull --ff-only )
+       (
+               set -e
+               cd "$AXZSH"
+               git pull --ff-only || ax_error "Git pull failed!"
+               git log --pretty=format:"%C(yellow)%h %C(blue)%ar %C(green)%an %Creset%s" ORIG_HEAD..
+       )
 }
 
 function UpgradeForeignPlugins {
@@ -310,8 +315,10 @@ function UpgradeForeignPlugins {
                if [[ -d "$dir/.git" ]]; then
                        ax_msg - "Upgrading \"$name\" [git] ..."
                        (
+                               set -e
                                cd "$dir"
-                               git pull --ff-only || ax_error "Pull failed!"
+                               git pull --ff-only || ax_error "Git pull failed!"
+                               git log --pretty=format:"%C(yellow)%h %C(blue)%ar %C(green)%an %Creset%s" ORIG_HEAD..
                        )
                else
                        ax_error "Unknown repository type!"