From 38b3b9517e3158a2f655d092bda35cbb1c1525ca Mon Sep 17 00:00:00 2001 From: Eric Nielsen Date: Fri, 11 Jan 2019 11:14:26 -0500 Subject: [PATCH] [git] Add `glr` alias for git reflog and change the commit format to bold yellow, since that's the default git log format for the commit when colored. Closes #334 Copied from zimfw/git@013c9d9bf3dc21f3c5841565a8ee300a4e6bfaa7 --- modules/git/README.md | 1 + modules/git/init.zsh | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/git/README.md b/modules/git/README.md index 9c0abc7..e82405b 100644 --- a/modules/git/README.md +++ b/modules/git/README.md @@ -107,6 +107,7 @@ Aliases * `glG` displays the graph log with authors and dates. * `glv` displays the log verifying the GPG signature of commits. * `glc` displays the commit count for each contributor in descending order. + * `glr` manages reflog information. ### Merge diff --git a/modules/git/init.zsh b/modules/git/init.zsh index 6141801..5a63505 100644 --- a/modules/git/init.zsh +++ b/modules/git/init.zsh @@ -6,11 +6,11 @@ # Settings # -# Log colour scheme has yellow commit hash, bold blue author, cyan date, auto ref names +# Log colour scheme has bold yellow commit hash, bold blue author, cyan date, auto ref names # See https://git-scm.com/docs/pretty-formats -_git_log_medium_format='%C(bold)Commit:%C(reset) %C(yellow)%H%C(auto)%d%n%C(bold)Author:%C(reset) %C(bold blue)%an <%ae>%n%C(bold)Date:%C(reset) %C(cyan)%ai (%ar)%C(reset)%n%+B' -_git_log_oneline_format='%C(yellow)%h%C(reset) %s%C(auto)%d%C(reset)' -_git_log_oneline_medium_format='%C(yellow)%h%C(reset) %<|(60,trunc)%s %C(bold blue)<%an> %C(reset)%C(cyan)(%ar)%C(auto)%d%C(reset)' +_git_log_medium_format='%C(bold)Commit: %C(yellow)%H%C(reset)%C(auto)%d%n%C(bold)Author:%C(reset) %C(bold blue)%an <%ae>%n%C(bold)Date:%C(reset) %C(cyan)%ai (%ar)%C(reset)%n%+B' +_git_log_oneline_format='%C(bold)%C(yellow)%h%C(reset) %s%C(auto)%d%C(reset)' +_git_log_oneline_medium_format='%C(bold)%C(yellow)%h%C(reset) %<|(60,trunc)%s %C(bold blue)<%an> %C(reset)%C(cyan)(%ar)%C(auto)%d%C(reset)' # # Aliases @@ -101,6 +101,7 @@ alias glg='git log --topo-order --all --graph --pretty=format:"${_git_log_onelin alias glG='git log --topo-order --all --graph --pretty=format:"${_git_log_oneline_medium_format}"' alias glv='git log --topo-order --show-signature --pretty=format:"${_git_log_medium_format}"' alias glc='git shortlog --summary --numbered' +alias glr='git reflog' # Merge (m) alias gm='git merge'