Re: git rev-list fails to verify ssh-signed commits (but git log works)
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 8, 2023, 17:00 UTC
- Message-ID
- <xmqqfsbgt7mn.fsf@gitster.g>
- In-Reply-To
- <Y+PGRaiTTaZ/DtlJ@work-laptop-max>
Max Gautier <max.gautier@redhat.com> writes:
> $ git rev-list @{u}..HEAD --format='%G? %H'
> commit 9497d347b048dbea7f527624f815f7926594c4bc
> error: gpg.ssh.allowedSignersFile needs to be configured and exist for ssh signature verification"git rev-list" as a plumbing does not want to read in or be affected by unnecessary configuration variables, so it uses git_default_config() to read the barebones, unlike "git log" that uses git_log_config() that calls, among other things, git_gpg_config().
Untill "git rev-list" learns to inspect the --format string and checks necessary configuration on-demand (e.g. presence of "%G" signals the need to call git_gpg_config()), this is sort of expected, unfortunately.