From 2ae84d3326e2abf568502347ed47cd50adeb28d7 Mon Sep 17 00:00:00 2001 From: sandr01d <88739791+sandr01d@users.noreply.github.com> Date: Fri, 26 Apr 2024 23:02:50 +0200 Subject: [PATCH] Allow disabling --graph with FORGIT_LOG_GRAPH_ENABLE=false in grc (#387) --- bin/git-forgit | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/git-forgit b/bin/git-forgit index 9ae7647d..d1e2feb6 100755 --- a/bin/git-forgit +++ b/bin/git-forgit @@ -838,6 +838,8 @@ _forgit_revert_commit() { --preview=\"$FORGIT revert_preview {}\" $FORGIT_REVERT_COMMIT_FZF_OPTS " + graph=() + [[ $_forgit_log_graph_enable == true ]] && graph=(--graph) # in this function, we do something interesting to maintain proper ordering as it's assumed # you generally want to revert newest->oldest when you multiselect @@ -848,7 +850,7 @@ _forgit_revert_commit() { while IFS='' read -r commit; do commits+=("$commit") done < <( - git log --graph --color=always --format="$_forgit_log_format" | + git log "${graph[@]}" --color=always --format="$_forgit_log_format" | _forgit_emojify | nl | FZF_DEFAULT_OPTS="$opts" fzf |