<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/gpg-interface.c, branch v2.40.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.40.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.40.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2023-02-24T19:32:29Z</updated>
<entry>
<title>Merge branch 'js/gpg-errors'</title>
<updated>2023-02-24T19:32:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-02-24T19:32:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=38a227b796653d61a21d9b31e44e48dd66f647e0'/>
<id>urn:sha1:38a227b796653d61a21d9b31e44e48dd66f647e0</id>
<content type='text'>
Error messages given upon a signature verification failure used to
discard the errors from underlying gpg program, which has been
corrected.

* js/gpg-errors:
  gpg: do show gpg's error message upon failure
  t7510: add a test case that does not need gpg
</content>
</entry>
<entry>
<title>gpg: do show gpg's error message upon failure</title>
<updated>2023-02-15T16:55:24Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2023-02-15T05:58:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ad6b320756d8d9150291c696a02c86d1c2f0f4b2'/>
<id>urn:sha1:ad6b320756d8d9150291c696a02c86d1c2f0f4b2</id>
<content type='text'>
There are few things more frustrating when signing a commit fails than
reading a terse "error: gpg failed to sign the data" message followed by
the unsurprising "fatal: failed to write commit object" message.

In many cases where signing a commit or tag fails, `gpg` actually said
something helpful, on its stderr, and Git even consumed that, but then
keeps mum about it.

Teach Git to stop withholding that rather important information.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ssh signing: better error message when key not in agent</title>
<updated>2023-01-25T16:59:51Z</updated>
<author>
<name>Adam Szkoda</name>
<email>adaszko@gmail.com</email>
</author>
<published>2023-01-25T12:40:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dce7b311266951fc2fb7a1dcbe89416ba8cebbb5'/>
<id>urn:sha1:dce7b311266951fc2fb7a1dcbe89416ba8cebbb5</id>
<content type='text'>
When signing a commit with a SSH key, with the private key missing from
ssh-agent, a confusing error message is produced:

    error: Load key
    "/var/folders/t5/cscwwl_n3n1_8_5j_00x_3t40000gn/T//.git_signing_key_tmpkArSj7":
    invalid format? fatal: failed to write commit object

The temporary file .git_signing_key_tmpkArSj7 created by git contains a
valid *public* key.  The error message comes from `ssh-keygen -Y sign' and
is caused by a fallback mechanism in ssh-keygen whereby it tries to
interpret .git_signing_key_tmpkArSj7 as a *private* key if it can't find in
the agent [1].  A fix is scheduled to be released in OpenSSH 9.1. All that
needs to be done is to pass an additional backward-compatible option -U to
'ssh-keygen -Y sign' call.  With '-U', ssh-keygen always interprets the file
as public key and expects to find the private key in the agent.

As a result, when the private key is missing from the agent, a more accurate
error message gets produced:

    error: Couldn't find key in agent

[1] https://bugzilla.mindrot.org/show_bug.cgi?id=3429

Signed-off-by: Adam Szkoda &lt;adaszko@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'pw/ssh-sign-report-errors'</title>
<updated>2022-10-11T17:36:11Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-10-11T17:36:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=644195e02f445bf4fcf79e47c339f593c7646c9e'/>
<id>urn:sha1:644195e02f445bf4fcf79e47c339f593c7646c9e</id>
<content type='text'>
The codepath to sign learned to report errors when it fails to read
from "ssh-keygen".

* pw/ssh-sign-report-errors:
  ssh signing: return an error when signature cannot be read
</content>
</entry>
<entry>
<title>ssh signing: return an error when signature cannot be read</title>
<updated>2022-10-05T17:21:52Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2022-10-04T10:01:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=36fb0d07d83df475bc6b716795b2111f8408cbcf'/>
<id>urn:sha1:36fb0d07d83df475bc6b716795b2111f8408cbcf</id>
<content type='text'>
If the signature file cannot be read we print an error message but do
not return an error to the caller. In practice it seems unlikely that
the file would be unreadable if the call to ssh-keygen succeeds.

The unlink_or_warn() call is moved to the end of the function so that
we always try and remove the signature file. This isn't strictly
necessary at the moment but it protects us against any extra code
being added between trying to read the signature file and the cleanup
at the end of the function in the future. unlink_or_warn() only prints
a warning if it exists and cannot be removed.

Signed-off-by: Phillip Wood &lt;phillip.wood@dunelm.org.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git-compat-util.h: use "UNUSED", not "UNUSED(var)"</title>
<updated>2022-09-01T17:49:48Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-08-25T17:09:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5cf88fd8b059235b21ee2f72b17bf1f421a9c4e7'/>
<id>urn:sha1:5cf88fd8b059235b21ee2f72b17bf1f421a9c4e7</id>
<content type='text'>
As reported in [1] the "UNUSED(var)" macro introduced in
2174b8c75de (Merge branch 'jk/unused-annotation' into next,
2022-08-24) breaks coccinelle's parsing of our sources in files where
it occurs.

Let's instead partially go with the approach suggested in [2] of
making this not take an argument. As noted in [1] "coccinelle" will
ignore such tokens in argument lists that it doesn't know about, and
it's less of a surprise to syntax highlighters.

This undoes the "help us notice when a parameter marked as unused is
actually use" part of 9b240347543 (git-compat-util: add UNUSED macro,
2022-08-19), a subsequent commit will further tweak the macro to
implement a replacement for that functionality.

1. https://lore.kernel.org/git/220825.86ilmg4mil.gmgdl@evledraar.gmail.com/
2. https://lore.kernel.org/git/220819.868rnk54ju.gmgdl@evledraar.gmail.com/

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>config: mark unused callback parameters</title>
<updated>2022-08-19T19:18:55Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2022-08-19T10:08:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=783a86c1427637d71fb2710291e677360ab5dc09'/>
<id>urn:sha1:783a86c1427637d71fb2710291e677360ab5dc09</id>
<content type='text'>
The callback passed to git_config() must conform to a particular
interface. But most callbacks don't actually look at the extra "void
*data" parameter. Let's mark the unused parameters to make
-Wunused-parameter happy.

Note there's one unusual case here in get_remote_default() where we
actually ignore the "value" parameter. That's because it's only checking
whether the option is found at all, and not parsing its value.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>gpg-interface: add function for converting trust level to string</title>
<updated>2022-07-11T05:10:23Z</updated>
<author>
<name>Jaydeep Das</name>
<email>jaydeepjd.8914@gmail.com</email>
</author>
<published>2022-07-11T05:00:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=803978da494bf88ee60fb9598c94e25d601c5c32'/>
<id>urn:sha1:803978da494bf88ee60fb9598c94e25d601c5c32</id>
<content type='text'>
Add new helper function `gpg_trust_level_to_str()` which will
convert a given member of `enum signature_trust_level` to its
corresponding string (in lowercase). For example, `TRUST_ULTIMATE`
will yield the string "ultimate".

This will abstract out some code in `pretty.c` relating to gpg
signature trust levels.

Mentored-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Mentored-by: Hariom Verma &lt;hariom18599@gmail.com&gt;
Signed-off-by: Jaydeep Das &lt;jaydeepjd.8914@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>i18n: fix mismatched camelCase config variables</title>
<updated>2022-06-17T17:38:26Z</updated>
<author>
<name>Jiang Xin</name>
<email>zhiyou.jx@alibaba-inc.com</email>
</author>
<published>2022-06-17T10:03:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b4eda05d58ca3e4808d3d86ab5826c77995a06f7'/>
<id>urn:sha1:b4eda05d58ca3e4808d3d86ab5826c77995a06f7</id>
<content type='text'>
Some config variables are combinations of multiple words, and we
typically write them in camelCase forms in manpage and translatable
strings. It's not easy to find mismatches for these camelCase config
variables during code reviews, but occasionally they are identified
during localization translations.

To check for mismatched config variables, I introduced a new feature
in the helper program for localization[^1]. The following mismatched
config variables have been identified by running the helper program,
such as "git-po-helper check-pot".

Lowercase in manpage should use camelCase:

 * Documentation/config/http.txt: http.pinnedpubkey

Lowercase in translable strings should use camelCase:

 * builtin/fast-import.c:  pack.indexversion
 * builtin/gc.c:           gc.logexpiry
 * builtin/index-pack.c:   pack.indexversion
 * builtin/pack-objects.c: pack.indexversion
 * builtin/repack.c:       pack.writebitmaps
 * commit.c:               i18n.commitencoding
 * gpg-interface.c:        user.signingkey
 * http.c:                 http.postbuffer
 * submodule-config.c:     submodule.fetchjobs

Mismatched camelCases, choose the former:

 * Documentation/config/transfer.txt: transfer.credentialsInUrl
   remote.c:                          transfer.credentialsInURL

[^1]: https://github.com/git-l10n/git-po-helper

Signed-off-by: Jiang Xin &lt;zhiyou.jx@alibaba-inc.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'fs/gpgsm-update'</title>
<updated>2022-03-13T22:56:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-03-13T22:56:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=21b839e606c173efa942dc282b3b6b542d7242f5'/>
<id>urn:sha1:21b839e606c173efa942dc282b3b6b542d7242f5</id>
<content type='text'>
Newer version of GPGSM changed its output in a backward
incompatible way to break our code that parses its output.  It also
added more processes our tests need to kill when cleaning up.
Adjustments have been made to accommodate these changes.

* fs/gpgsm-update:
  t/lib-gpg: kill all gpg components, not just gpg-agent
  t/lib-gpg: reload gpg components after updating trustlist
  gpg-interface/gpgsm: fix for v2.3
</content>
</entry>
</feed>
