<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/refs, branch v2.50.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.50.0</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.50.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2025-06-03T15:55:23Z</updated>
<entry>
<title>Merge branch 'sj/ref-contents-check-fix'</title>
<updated>2025-06-03T15:55:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-06-03T15:55:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c38b74f28618d71cf4987aa215d1f7c432a318ac'/>
<id>urn:sha1:c38b74f28618d71cf4987aa215d1f7c432a318ac</id>
<content type='text'>
"git verify-refs" (and hence "git fsck --reference") started
erroring out in a repository in which secondary worktrees were
prepared with Git 2.43 or lower.

* sj/ref-contents-check-fix:
  fsck: ignore missing "refs" directory for linked worktrees
</content>
</entry>
<entry>
<title>fsck: ignore missing "refs" directory for linked worktrees</title>
<updated>2025-06-02T18:20:19Z</updated>
<author>
<name>shejialuo</name>
<email>shejialuo@gmail.com</email>
</author>
<published>2025-06-02T14:41:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d5b3c38b8a1356921a87cc3d435e6de91a9fbff1'/>
<id>urn:sha1:d5b3c38b8a1356921a87cc3d435e6de91a9fbff1</id>
<content type='text'>
"git refs verify" doesn't work if there are worktrees created on Git
v2.43.0 or older versions. These versions don't automatically create the
"refs" directory, causing the error:

    error: cannot open directory .git/worktrees/&lt;worktree name&gt;/refs:
    No such file or directory

Since 8f4c00de95 (builtin/worktree: create refdb via ref backend,
2024-01-08), we automatically create the "refs" directory for new
worktrees. And in 7c78d819e6 (ref: support multiple worktrees check for
refs, 2024-11-20), we assume that all linked worktrees have this
directory and would wrongly report an error to the user, thus
introducing compatibility issue.

Check for ENOENT errno before reporting directory access errors for
linked worktrees to maintain backward compatibility.

Reported-by: Kristoffer Haugsbakk &lt;code@khaugsbakk.name&gt;
Signed-off-by: shejialuo &lt;shejialuo@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>packed-backend: mmap large "packed-refs" file during fsck</title>
<updated>2025-05-14T19:32:59Z</updated>
<author>
<name>shejialuo</name>
<email>shejialuo@gmail.com</email>
</author>
<published>2025-05-14T15:50:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=86ddd588f24acf3960489dccb8aed82dc570796b'/>
<id>urn:sha1:86ddd588f24acf3960489dccb8aed82dc570796b</id>
<content type='text'>
During fsck, we use "strbuf_read" to read the content of "packed-refs"
without using mmap mechanism. This is a bad practice which would consume
more memory than using mmap mechanism. Besides, as all code paths in
"packed-backend.c" use this way, we should make "fsck" align with the
current codebase.

As we have introduced the helper function "allocate_snapshot_buffer", we
can simply use this function to use mmap mechanism.

Suggested-by: Jeff King &lt;peff@peff.net&gt;
Suggested-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: shejialuo &lt;shejialuo@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>packed-backend: extract snapshot allocation in `load_contents`</title>
<updated>2025-05-14T19:32:58Z</updated>
<author>
<name>shejialuo</name>
<email>shejialuo@gmail.com</email>
</author>
<published>2025-05-14T15:50:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a0dee3f74b4f42076b7c23ca6d9aca61ed064e82'/>
<id>urn:sha1:a0dee3f74b4f42076b7c23ca6d9aca61ed064e82</id>
<content type='text'>
"load_contents" would choose which way to load the content of the
"packed-refs". However, we cannot directly use this function when
checking the consistency due to we don't want to open the file. And we
also need to reuse the logic to avoid causing repetition.

Let's create a new helper function "allocate_snapshot_buffer" to extract
the snapshot allocation logic in "load_contents" and update the
"load_contents" to align with the behavior.

Suggested-by: Jeff King &lt;peff@peff.net&gt;
Suggested-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: shejialuo &lt;shejialuo@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>packed-backend: fsck should warn when "packed-refs" file is empty</title>
<updated>2025-05-14T19:32:58Z</updated>
<author>
<name>shejialuo</name>
<email>shejialuo@gmail.com</email>
</author>
<published>2025-05-14T15:50:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=784ceccb91b82dc8a2c69ddd6f1f5ccc2e2f96f2'/>
<id>urn:sha1:784ceccb91b82dc8a2c69ddd6f1f5ccc2e2f96f2</id>
<content type='text'>
We assume the "packed-refs" won't be empty and instead has at least one
line in it (even when there are no refs packed, there is the file header
line). Because there is no terminating LF in the empty file, we will
report "packedRefEntryNotTerminated(ERROR)" to the user.

However, the runtime code paths would accept an empty "packed-refs"
file, for example, "create_snapshot" would simply return the "snapshot"
without checking the content of "packed-refs". So, we should skip
checking the content of "packed-refs" when it is empty during fsck.

After 694b7a1999 (repack_without_ref(): write peeled refs in the
rewritten file, 2013-04-22), we would always write a header into the
"packed-refs" file. So, versions of Git that are not too ancient never
write such an empty "packed-refs" file.

As an empty file often indicates a sign of a filesystem-level issue, the
way we want to resolve this inconsistency is not make everybody totally
silent but notice and report the anomaly.

Let's create a "FSCK_INFO" message id "EMPTY_PACKED_REFS_FILE" to report
to the users that "packed-refs" is empty.

Signed-off-by: shejialuo &lt;shejialuo@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ps/object-file-cleanup'</title>
<updated>2025-04-25T00:25:33Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-04-25T00:25:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=36d8035d27d6100a525a0e25619868b9542a4f35'/>
<id>urn:sha1:36d8035d27d6100a525a0e25619868b9542a4f35</id>
<content type='text'>
Code clean-up.

* ps/object-file-cleanup:
  object-store: merge "object-store-ll.h" and "object-store.h"
  object-store: remove global array of cached objects
  object: split out functions relating to object store subsystem
  object-file: drop `index_blob_stream()`
  object-file: split up concerns of `HASH_*` flags
  object-file: split out functions relating to object store subsystem
  object-file: move `xmmap()` into "wrapper.c"
  object-file: move `git_open_cloexec()` to "compat/open.c"
  object-file: move `safe_create_leading_directories()` into "path.c"
  object-file: move `mkdir_in_gitdir()` into "path.c"
</content>
</entry>
<entry>
<title>Merge branch 'ps/refname-avail-check-optim'</title>
<updated>2025-04-17T17:28:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-04-17T17:28:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c81538ea6cf4612a6ec2128c2bdb94abdbda8b97'/>
<id>urn:sha1:c81538ea6cf4612a6ec2128c2bdb94abdbda8b97</id>
<content type='text'>
Incorrect sorting of refs with bytes with high-bit set on platforms
with signed char led to a BUG, which has been corrected.

* ps/refname-avail-check-optim:
  refs/packed: fix BUG when seeking refs with UTF-8 characters
</content>
</entry>
<entry>
<title>Merge branch 'kn/non-transactional-batch-updates'</title>
<updated>2025-04-16T20:54:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-04-16T20:54:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=47478802daddf3f9916111307f153c6298ffc0bc'/>
<id>urn:sha1:47478802daddf3f9916111307f153c6298ffc0bc</id>
<content type='text'>
Updating multiple references have only been possible in all-or-none
fashion with transactions, but it can be more efficient to batch
multiple updates even when some of them are allowed to fail in a
best-effort manner.  A new "best effort batches of updates" mode
has been introduced.

* kn/non-transactional-batch-updates:
  update-ref: add --batch-updates flag for stdin mode
  refs: support rejection in batch updates during F/D checks
  refs: implement batch reference update support
  refs: introduce enum-based transaction error types
  refs/reftable: extract code from the transaction preparation
  refs/files: remove duplicate duplicates check
  refs: move duplicate refname update check to generic layer
  refs/files: remove redundant check in split_symref_update()
</content>
</entry>
<entry>
<title>Merge branch 'ps/object-wo-the-repository'</title>
<updated>2025-04-15T20:50:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-04-15T20:50:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ee847e0034dbfde11f901fbfb74d210c1edad496'/>
<id>urn:sha1:ee847e0034dbfde11f901fbfb74d210c1edad496</id>
<content type='text'>
The object layer has been updated to take an explicit repository
instance as a parameter in more code paths.

* ps/object-wo-the-repository:
  hash: stop depending on `the_repository` in `null_oid()`
  hash: fix "-Wsign-compare" warnings
  object-file: split out logic regarding hash algorithms
  delta-islands: stop depending on `the_repository`
  object-file-convert: stop depending on `the_repository`
  pack-bitmap-write: stop depending on `the_repository`
  pack-revindex: stop depending on `the_repository`
  pack-check: stop depending on `the_repository`
  environment: move access to "core.bigFileThreshold" into repo settings
  pack-write: stop depending on `the_repository` and `the_hash_algo`
  object: stop depending on `the_repository`
  csum-file: stop depending on `the_repository`
</content>
</entry>
<entry>
<title>object-file: move `safe_create_leading_directories()` into "path.c"</title>
<updated>2025-04-15T15:24:35Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-04-15T09:38:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1a99fe8010642a71063536510c578c1543d763b4'/>
<id>urn:sha1:1a99fe8010642a71063536510c578c1543d763b4</id>
<content type='text'>
The `safe_create_leading_directories()` function and its relatives are
located in "object-file.c", which is not a good fit as they provide
generic functionality not related to objects at all. Move them into
"path.c", which already hosts `safe_create_dir()` and its relative
`safe_create_dir_in_gitdir()`.

"path.c" is free of `the_repository`, but the moved functions depend on
`the_repository` to read the "core.sharedRepository" config. Adapt the
function signature to accept a repository as argument to fix the issue
and adjust callers accordingly.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
