diff --git a/dup b/dup index 5ef4622..1bed008 100755 --- a/dup +++ b/dup @@ -48,10 +48,15 @@ function do_pull_maybe_quiet() { name="$1" dir="${2:-$name}" git_out="$(do_pull $dir)" - if [[ "$quiet" != true || "$git_out" != "Already up to date." ]] + first_line="${git_out%%$'\n'*}" + if [[ "$quiet" != true || "$first_line" != "Already up to date." ]] then - echo "Updating $name" - echo "$git_out" + echo "$(tput setaf 4)}$(tput sgr0) $(tput bold)$name$(tput sgr0): $first_line" + fi + if [[ $first_line == Updating* ]] + then + git -C "${dir}" log --graph --color --format='%C(yellow)%h%C(reset) %s %C(cyan)(%cr)%C(reset)' ${first_line##Updating } \ + | sed 's/^/ /' fi }