summaryrefslogtreecommitdiffstats
path: root/tv
diff options
context:
space:
mode:
authorlassulus <lass@aidsballs.de>2015-09-28 18:43:56 +0200
committerlassulus <lass@aidsballs.de>2015-09-28 18:43:56 +0200
commitad5ef3947660cb3ca76b30f908621beb513903a2 (patch)
treeed68bb6a682c77a5a87e84ee4a2a7463e8cd13f6 /tv
parenta9f6f7ac7b8e70633164d10980d1d041f34be3ac (diff)
parentc88a7d3be5d9a8ee748cb8bdfac97de3277e0d5e (diff)
Merge branch 'tv'
Diffstat (limited to 'tv')
-rw-r--r--tv/4lib/git.nix21
1 files changed, 20 insertions, 1 deletions
diff --git a/tv/4lib/git.nix b/tv/4lib/git.nix
index 2b25debdc..fe6401728 100644
--- a/tv/4lib/git.nix
+++ b/tv/4lib/git.nix
@@ -157,7 +157,6 @@ let
link="$cgit_endpoint/$GIT_SSH_REPO/ ($h)"
;;
fast-forward|non-fast-forward)
- #git diff --stat $id..$id2
link="$cgit_endpoint/$GIT_SSH_REPO/diff/?h=$h&id=$id&id2=$id2"
;;
esac
@@ -165,6 +164,26 @@ let
#$host $GIT_SSH_REPO $ref $link
message="''${message+$message
}$GIT_SSH_USER $receive_mode $link"
+
+ message=''${message+$message
+ }$(
+ green() { printf '\x0303,99%s\x0F' "$1"; }
+ red() { printf '\x0304,99%s\x0F' "$1"; }
+ orange() { printf '\x0307,99%s\x0F' "$1"; }
+ gray() { printf '\x0314,99%s\x0F' "$1"; }
+
+ git log \
+ --format="$(orange %h) %s $(gray '(%ar)')" \
+ --reverse \
+ $id2..$id
+
+ git diff --stat $id2..$id \
+ | sed '
+ $!s/+/'$(green '&')'/g
+ $!s/-/'$(red '&')'/g
+ '
+ )
+
done
if test -n "''${message-}"; then