From 1d99d5dbf55444b10aef3b58383e90b954b1f94b Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Wed, 5 Oct 2022 17:13:52 +0200 Subject: [PATCH] zsh:glog: Do not pass `--graph` by default `--graph` can get very slow for large repos with many branches. Make `glog` independent of it and rather add an alias that uses `glog --graph`. --- .config/zsh/autoload/git/glog | 5 ++--- .config/zsh/zshrc.d/30-alias.zsh | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.config/zsh/autoload/git/glog b/.config/zsh/autoload/git/glog index caed4c3..e42b97f 100755 --- a/.config/zsh/autoload/git/glog +++ b/.config/zsh/autoload/git/glog @@ -116,8 +116,7 @@ else fzf_args+=(--preview-window=down) fi -# Display an ascii graph of the commits in the above format and pipe that into -# fzf. -git log "$formatshort" --graph "$dateshort" --color=always "$@" \ +# Display the commits in the above format and pipe that into fzf. +git log "$formatshort" "$dateshort" --color=always "$@" \ | env LESS="$LESS${LESS:+ }-+F" fzf "${fzf_args[@]}" return 0 diff --git a/.config/zsh/zshrc.d/30-alias.zsh b/.config/zsh/zshrc.d/30-alias.zsh index f1e4942..38f7f0b 100644 --- a/.config/zsh/zshrc.d/30-alias.zsh +++ b/.config/zsh/zshrc.d/30-alias.zsh @@ -70,7 +70,8 @@ fi alias gpush='git push' alias gpull='git pull' alias gl='glog' - alias gl{l,ogg}='glog --branches --remotes' + alias gll='glog --graph' + alias gl{ll,ogg}='glog --graph --branches --remotes' alias gr='git rebase' alias grc='git rebase --continue' alias grcia='git rebase --committer-date-is-author-date'