<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/contrib, branch v2.46.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.46.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.46.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2024-08-26T18:10:17Z</updated>
<entry>
<title>Merge branch 'jk/osxkeychain-username-is-nul-terminated' into maint-2.46</title>
<updated>2024-08-26T18:10:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-08-26T18:10:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=87f8426bf7f88d3a5424c486ff4e5fc4b1aa40ab'/>
<id>urn:sha1:87f8426bf7f88d3a5424c486ff4e5fc4b1aa40ab</id>
<content type='text'>
The credential helper to talk to OSX keychain sometimes sent
garbage bytes after the username, which has been corrected.

* jk/osxkeychain-username-is-nul-terminated:
  credential/osxkeychain: respect NUL terminator in username
</content>
</entry>
<entry>
<title>credential/osxkeychain: respect NUL terminator in username</title>
<updated>2024-08-01T15:54:47Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2024-08-01T08:25:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b201316835bbf2c49c2780f23cfd6146f6b8d1a2'/>
<id>urn:sha1:b201316835bbf2c49c2780f23cfd6146f6b8d1a2</id>
<content type='text'>
This patch fixes a case where git-credential-osxkeychain might output
uninitialized bytes to stdout.

We need to get the username string from a system API using
CFStringGetCString(). To do that, we get the max size for the string
from CFStringGetMaximumSizeForEncoding(), allocate a buffer based on
that, and then read into it. But then we print the entire buffer to
stdout, including the trailing NUL and any extra bytes which were not
needed. Instead, we should stop at the NUL.

This code comes from 9abe31f5f1 (osxkeychain: replace deprecated
SecKeychain API, 2024-02-17). The bug was probably overlooked back then
because this code is only used as a fallback when we can't get the
string via CFStringGetCStringPtr(). According to Apple's documentation:

  Whether or not this function returns a valid pointer or NULL depends
  on many factors, all of which depend on how the string was created and
  its properties.

So it's not clear how we could make a test for this, and we'll have to
rely on manually testing on a system that triggered the bug in the first
place.

Reported-by: Hong Jiang &lt;ilford@gmail.com&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Tested-by: Hong Jiang &lt;ilford@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>cmake: fix build of `t-oidtree`</title>
<updated>2024-07-12T21:32:52Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2024-07-12T20:34:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=872721538c2612bd330f09423e465035882c4168'/>
<id>urn:sha1:872721538c2612bd330f09423e465035882c4168</id>
<content type='text'>
When the `oidtree` test helper was turned into a unit test, a new
`lib-oid` source file was added as dependency. This was only done in the
Makefile so far, but also needs to be done in the CMake definition.

This is a companion of ed548408723d (t/: migrate helper/test-oidtree.c
to unit-tests/t-oidtree.c, 2024-06-08).

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>Merge branch 'kn/osxkeychain-skip-idempotent-store'</title>
<updated>2024-05-28T18:17:11Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-05-28T18:17:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2a1a882890a3336f6f44d33793eedb70ff75d37a'/>
<id>urn:sha1:2a1a882890a3336f6f44d33793eedb70ff75d37a</id>
<content type='text'>
The credential helper that talks with osx keychain learned to avoid
storing back the authentication material it just got received from
the keychain.

* kn/osxkeychain-skip-idempotent-store:
  osxkeychain: state to skip unnecessary store operations
  osxkeychain: exclusive lock to serialize execution of operations
</content>
</entry>
<entry>
<title>Merge branch 'ps/complete-config-w-subcommands'</title>
<updated>2024-05-28T18:17:08Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-05-28T18:17:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7a40196328b5dc94da846cb8354e605508180faf'/>
<id>urn:sha1:7a40196328b5dc94da846cb8354e605508180faf</id>
<content type='text'>
The command line completion script (in contrib/) has been adjusted
to the recent update to "git config" that adopted subcommand based
UI.

* ps/complete-config-w-subcommands:
  completion: adapt git-config(1) to complete subcommands
</content>
</entry>
<entry>
<title>completion: adapt git-config(1) to complete subcommands</title>
<updated>2024-05-17T16:26:19Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-05-17T06:13:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5dd5007f8936f8d37cf95119e83039bd9237a3c5'/>
<id>urn:sha1:5dd5007f8936f8d37cf95119e83039bd9237a3c5</id>
<content type='text'>
With fe3ccc7aab (Merge branch 'ps/config-subcommands', 2024-05-15),
git-config(1) has gained support for subcommands. These subcommands live
next to the old, action-based mode, so that both the old and new way
continue to work.

The manpage for this command has been updated to prominently show the
subcommands, and the action-based modes are marked as deprecated. Update
Bash completion scripts accordingly to advertise subcommands instead of
actions.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ps/refs-without-the-repository'</title>
<updated>2024-05-16T17:10:14Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-05-16T17:10:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bca900904d854babf2493d57c0fee3ab421fe750'/>
<id>urn:sha1:bca900904d854babf2493d57c0fee3ab421fe750</id>
<content type='text'>
The refs API lost functions that implicitly assumes to work on the
primary ref_store by forcing the callers to pass a ref_store as an
argument.

* ps/refs-without-the-repository:
  refs: remove functions without ref store
  cocci: apply rules to rewrite callers of "refs" interfaces
  cocci: introduce rules to transform "refs" to pass ref store
  refs: add `exclude_patterns` parameter to `for_each_fullref_in()`
  refs: introduce missing functions that accept a `struct ref_store`
</content>
</entry>
<entry>
<title>osxkeychain: state to skip unnecessary store operations</title>
<updated>2024-05-15T21:02:45Z</updated>
<author>
<name>Koji Nakamaru</name>
<email>koji.nakamaru@gree.net</email>
</author>
<published>2024-05-15T19:21:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e1ab45b2dab51f94db9548666dfd7af626d2aa7e'/>
<id>urn:sha1:e1ab45b2dab51f94db9548666dfd7af626d2aa7e</id>
<content type='text'>
git passes a credential that has been used successfully to the helpers
to record. If a credential is already stored,
"git-credential-osxkeychain store" just records the credential returned
by "git-credential-osxkeychain get", and unnecessary (sometimes
problematic) SecItemAdd() and/or SecItemUpdate() are performed.

We can skip such unnecessary operations by marking a credential returned
by "git-credential-osxkeychain get". This marking can be done by
utilizing the "state[]" feature:

- The "get" command sets the field "state[]=osxkeychain:seen=1".

- The "store" command skips its actual operation if the field
  "state[]=osxkeychain:seen=1" exists.

Introduce a new state "state[]=osxkeychain:seen=1".

Suggested-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Koji Nakamaru &lt;koji.nakamaru@gree.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>osxkeychain: exclusive lock to serialize execution of operations</title>
<updated>2024-05-15T21:02:44Z</updated>
<author>
<name>Koji Nakamaru</name>
<email>koji.nakamaru@gree.net</email>
</author>
<published>2024-05-15T19:21:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fcf5b74e59c1c0d18a8e8e939475007b3b5f83ad'/>
<id>urn:sha1:fcf5b74e59c1c0d18a8e8e939475007b3b5f83ad</id>
<content type='text'>
git passes a credential that has been used successfully to the helpers
to record. If "git-credential-osxkeychain store" commands run in
parallel (with fetch.parallel configuration and/or by running multiple
git commands simultaneously), some of them may exit with the error
"failed to store: -25299". This is because SecItemUpdate() in
add_internet_password() may return errSecDuplicateItem (-25299) in this
situation. Apple's documentation [1] also states as below:

  In macOS, some of the functions of this API block while waiting for
  input from the user (for example, when the user is asked to unlock a
  keychain or give permission to change trust settings). In general, it
  is safe to use this API in threads other than your main thread, but
  avoid calling the functions from multiple operations, work queues, or
  threads concurrently. Instead, serialize function calls or confine
  them to a single thread.

The error has not been noticed before, because the former implementation
ignored the error.

Introduce an exclusive lock to serialize execution of operations.

[1] https://developer.apple.com/documentation/security/certificate_key_and_trust_services/working_with_concurrency

Signed-off-by: Koji Nakamaru &lt;koji.nakamaru@gree.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'js/unit-test-suite-runner'</title>
<updated>2024-05-15T16:52:52Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-05-15T16:52:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b7a1d47ba5dd0df476104a63c6ddffe2d52fccf8'/>
<id>urn:sha1:b7a1d47ba5dd0df476104a63c6ddffe2d52fccf8</id>
<content type='text'>
The "test-tool" has been taught to run testsuite tests in parallel,
bypassing the need to use the "prove" tool.

* js/unit-test-suite-runner:
  cmake: let `test-tool` run the unit tests, too
  ci: use test-tool as unit test runner on Windows
  t/Makefile: run unit tests alongside shell tests
  unit tests: add rule for running with test-tool
  test-tool run-command testsuite: support unit tests
  test-tool run-command testsuite: remove hardcoded filter
  test-tool run-command testsuite: get shell from env
  t0080: turn t-basic unit test into a helper
</content>
</entry>
</feed>
