Skip to content

Commit

Permalink
[Search Git Log] never show GPG signature (PatrickF1#287)
Browse files Browse the repository at this point in the history
When the user has log.showSignature = true or the repo has showSignature = true, git log will check the GPG signature of signed commits. If the user does not have the public key for a signed commit, when triggering Search Git Log, raw GPG errors leak into the fzf window. We fix this by always passing --no-show-signature to the git log call.

Resolves PatrickF1#286.
  • Loading branch information
c4tich authored Jan 8, 2023
1 parent ad13b96 commit 5ecaeb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions/_fzf_search_git_log.fish
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function _fzf_search_git_log --description "Search the output of git log and pre
# %h gives you the abbreviated commit hash, which is useful for saving screen space, but we will have to expand it later below
set log_fmt_str '%C(bold blue)%h%C(reset) - %C(cyan)%ad%C(reset) %C(yellow)%d%C(reset) %C(normal)%s%C(reset) %C(dim normal)[%an]%C(reset)'
set selected_log_lines (
git log --color=always --format=format:$log_fmt_str --date=short | \
git log --no-show-signature --color=always --format=format:$log_fmt_str --date=short | \
_fzf_wrapper --ansi \
--multi \
--tiebreak=index \
Expand Down

0 comments on commit 5ecaeb6

Please sign in to comment.