From f83c79032d3bd6cef3aa2bcc988550111935792c Mon Sep 17 00:00:00 2001 From: mg Date: Tue, 14 Feb 2023 14:35:20 +0100 Subject: [PATCH] glogas: add ref --- .bash_extra | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.bash_extra b/.bash_extra index fcfbce3..3dd3df8 100644 --- a/.bash_extra +++ b/.bash_extra @@ -207,12 +207,12 @@ function glogs { # https://git-scm.com/docs/pretty-formats # https://stackoverflow.com/questions/3631005/git-log-tabular-formatting # https://stackoverflow.com/questions/7736781/how-to-make-git-log-not-prompt-to-continue - if [ -z "$1" ]; then - ncommits=30 - else - ncommits="$1" - fi - git --no-pager log --pretty=format:'%C(auto) %<|(16,trunc)%h %<|(60,trunc)%s %Cgreen%cr%Creset by %Cblue%an%Creset' --graph --all -$ncommits + if [ -z "$1" ]; then + ncommits=30; + else + ncommits="$1"; + fi; + git log --pretty=format:'%C(auto) %<|(16,trunc)%h %Cred %G?%Creset %<|(60,trunc)%s %<(20,trunc)%Cgreen%cr%Creset %<(15,trunc)%Cblue%an%Creset %Cred%D' --graph --all -$ncommits } ### Aliase # tmux