Skip to content

Commit

Permalink
Add date into the commit
Browse files Browse the repository at this point in the history
  • Loading branch information
angel-git committed Sep 19, 2023
1 parent 343f53a commit 093ca5c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gw.v
Original file line number Diff line number Diff line change
Expand Up @@ -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
'
}
Expand Down

0 comments on commit 093ca5c

Please sign in to comment.