From 2b4c92f174cf7881c2e07881cf4057e1d8597d7c Mon Sep 17 00:00:00 2001 From: Eragos Date: Tue, 12 Jul 2016 00:00:48 +0200 Subject: [PATCH] udot: print local changes --- functions | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/functions b/functions index 37d26c0..52bf5ee 100644 --- a/functions +++ b/functions @@ -3,6 +3,8 @@ udot() { info=$(git --no-pager log --pretty="%h by %an <%ae> on %cd" -1 --abbrev-commit) local=$(git --no-pager log --pretty="%H" -1) remote=$(git ls-remote origin | awk "/HEAD/ {print \$1}") + gstatus=$(git status -s) + echo -e "" echo -e ' ____ U ___ u _____ _____ _ U _____ u ____ ' echo -e ' | _"\ \/"_ \/|_ " _| |" ___| ___ |"| \| ___"|// __"| u ' @@ -15,6 +17,12 @@ udot() { echo -e "$info" echo -e "" + if [ "$status" != "" ]; then + echo -e "Local changes:" + echo -e "$gstatus" + echo -e "" + fi + if [ "$local" = "$remote" ]; then echo "Already up to date :)" else