From 093ca5c9d192862aae5925112c7a903382ac1db3 Mon Sep 17 00:00:00 2001 From: agavalda Date: Tue, 19 Sep 2023 16:14:17 +0200 Subject: [PATCH] Add date into the commit --- gw.v | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gw.v b/gw.v index 4eb9827..54aeb26 100644 --- a/gw.v +++ b/gw.v @@ -89,9 +89,10 @@ fn git_log(commit_message string, branch_or_tag_command string) string { return ' YELLOW="\033[0;33m" CYAN="\033[0;36m" - NC="\033[0m" - git log --format="%h %an" --all --grep "${commit_message}" | while read -r sha1 author; do - ${branch_or_tag_command} --contains \$sha1 | xargs -I {} echo {} "\${YELLOW}\$sha1\$NC - \$CYAN\$author\$NC"; + GREEN="\033[0;34m" + NC="\033[0m" + git log --format="%h %an %cd" --date=short --all --grep "${commit_message}" | while read -r sha1 author date; do + ${branch_or_tag_command} --contains \$sha1 | xargs -I {} echo {} "\${YELLOW}\$sha1\$NC - \$CYAN\$author\$NC \$GREEN(\$date)\$NC"; done ' }