Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow disabling --graph with FORGIT_LOG_GRAPH_ENABLE=false in grc #387

Merged
merged 1 commit into from
Apr 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion bin/git-forgit
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 |
Expand Down