From 20f16e4df34e0cb17cc1dfa1605a034dbd59bafe Mon Sep 17 00:00:00 2001 From: Eric Nielsen Date: Sat, 13 Jan 2018 17:56:20 -0500 Subject: [PATCH] [git] Remove `glb` alias and add `glO` as there's actually no "brief" format originally in git (by "originally" I mean the ones listed for `--format=` in `man git-log`). Also, we already fit in `glG` all the information that `glb` had. So add `glO`, that is a one-line variant of `glG`. Now we get nice symmetrical formats in `glg`/`glG` and in `glo`/`glO`. --- modules/git/README.md | 4 ++-- modules/git/init.zsh | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/modules/git/README.md b/modules/git/README.md index 1ff4f68..add9639 100644 --- a/modules/git/README.md +++ b/modules/git/README.md @@ -100,11 +100,11 @@ Aliases - `gls` displays the stats log. - `gld` displays the diff log. - `glo` displays the one line log. + - `glO` displays the one line log with authors and dates. - `glg` displays the graph log. - `glG` displays the graph log with authors and dates. - - `glb` displays the brief commit log. - - `glc` displays the commit count for each contributor in descending order. - `glv` displays the log verifying the GPG signature of commits. + - `glc` displays the commit count for each contributor in descending order. ### Merge diff --git a/modules/git/init.zsh b/modules/git/init.zsh index b8d739d..0b35075 100644 --- a/modules/git/init.zsh +++ b/modules/git/init.zsh @@ -10,8 +10,7 @@ # 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_fullgraph_format='%C(yellow)%h%C(reset) %<|(60,trunc)%s %C(bold blue)<%an> %C(reset)%C(cyan)(%ar)%C(auto)%d%C(reset)%n' -_git_log_brief_format='%C(yellow)%h%C(reset) %s%n%C(bold blue)(%ar by %an)%C(auto)%d%C(reset)%n' +_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)' # # Aliases @@ -97,11 +96,11 @@ alias gl='git log --topo-order --pretty=format:"${_git_log_medium_format}"' alias gls='git log --topo-order --stat --pretty=format:"${_git_log_medium_format}"' alias gld='git log --topo-order --stat --patch --full-diff --pretty=format:"${_git_log_medium_format}"' alias glo='git log --topo-order --pretty=format:"${_git_log_oneline_format}"' +alias glO='git log --topo-order --pretty=format:"${_git_log_oneline_medium_format}"' alias glg='git log --topo-order --all --graph --pretty=format:"${_git_log_oneline_format}%n"' -alias glG='git log --topo-order --all --graph --pretty=format:"${_git_log_fullgraph_format}"' -alias glb='git log --topo-order --pretty=format:"${_git_log_brief_format}"' -alias glc='git shortlog --summary --numbered' +alias glG='git log --topo-order --all --graph --pretty=format:"${_git_log_oneline_medium_format}%n"' alias glv='git log --topo-order --show-signature --pretty=format:"${_git_log_medium_format}"' +alias glc='git shortlog --summary --numbered' # Merge (m) alias gm='git merge'