From 18e2154931cda64cf6f3ed7added01b2fbcd1c0b Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 17 Nov 2024 17:15:47 +0100 Subject: [PATCH] format --- shell/alias/git.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/shell/alias/git.sh b/shell/alias/git.sh index 628799a..eb72938 100644 --- a/shell/alias/git.sh +++ b/shell/alias/git.sh @@ -1,3 +1,12 @@ +GIT_LOG_FORMAT="\ +%C(auto)%h%d +S %C(red)%GS +A %C(green)%ai + %C(green)%an %ae +C %C(blue)%ci + %C(blue)%cn %ce +%B" + # add to index ga() { git_add "${@}"; } git_add() { @@ -280,19 +289,11 @@ git_init_bare() { # log history gl() { git_log "${@}"; } git_log() { - local format="\ -%C(auto)%h%d -S %C(red)%GS -A %C(green)%ai - %C(green)%an %ae -C %C(blue)%ci - %C(blue)%cn %ce -%B" git \ log \ --abbrev=8 \ --abbrev-commit \ - --format="${format}" \ + --format="${GIT_LOG_FORMAT}" \ --graph \ "${@}" }