diff --git a/shell/alias/git.sh b/shell/alias/git.sh index 2b79893..cd81130 100644 --- a/shell/alias/git.sh +++ b/shell/alias/git.sh @@ -252,41 +252,46 @@ gib() { "${@}" } -# log all history -gla() { - glb \ - --all \ - "${@}" -} - -# log branch history -glb() { +# log history +gl() { + 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 \ - --format="%C(auto)%h%d %C(red)%ai%C(auto) %an%n%B" \ + --abbrev=8 \ + --abbrev-commit \ + --format="${format}" \ --graph \ "${@}" } -# log medium information -alias glm="\ -git \ -log \ ---all \ ---decorate \ ---graph \ ---pretty=medium \ -" +# log all history +gla() { + gl \ + --all \ + "${@}" +} -# log commits history with patches -alias glp="\ -git \ -log \ ---all \ ---graph \ ---format=\"%C(auto)%h%d %C(red)%ai%C(auto) %an%n%B\" \ ---patch \ -" +# log all history with patches +glap() { + gl \ + --all \ + --patch \ + "${@}" +} + +# log history with patches +glp() { + gl \ + --patch \ + "${@}" +} # abort the current merge commit alias gma="\