<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/path.c, branch main</title>
<subtitle>Fork of git SCM with my patches.</subtitle>
<id>http://git.kilabit.info/git/atom?h=main</id>
<link rel='self' href='http://git.kilabit.info/git/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/'/>
<updated>2026-03-26T16:38:06Z</updated>
<entry>
<title>backfill: work with prefix pathspecs</title>
<updated>2026-03-26T16:38:06Z</updated>
<author>
<name>Derrick Stolee</name>
<email>stolee@gmail.com</email>
</author>
<published>2026-03-26T15:14:52Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=7be182045a6a113b118982fc81296d5b9746779e'/>
<id>urn:sha1:7be182045a6a113b118982fc81296d5b9746779e</id>
<content type='text'>
The previous change allowed specifying revision arguments over the 'git
backfill' command-line. This created the opportunity for restricting the
initial commit set by filtering the revision walk through a pathspec. Other
than filtering the commit set (and thereby the root trees), this did not
restrict the path-walk implementation of 'git backfill' and did not restrict
the blobs that were downloaded to only those matching the pathspec.

Update the path-walk API to accept certain kinds of pathspecs and to
silently ignore anything too complex, for now. We will update this in the
next change to properly restrict to even complex pathspecs.

The current behavior focuses on pathspecs that match paths exactly. This
includes exact filenames, including directory names as prefixes. Pathspecs
containing wildcards or magic are cleared so the path walk downloads all
blobs, as before.

The reason for this restriction is to allow for a faster execution by
pruning the path walk to only trees that could contribute towards one of
those paths as a parent directory.

The test directory 'd/f/' (next to 'd/file*.txt') was prepared in a
previous commit to exercise the subtlety in prefix matching.

Signed-off-by: Derrick Stolee &lt;stolee@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'kj/path-micro-code-cleanup'</title>
<updated>2026-03-12T17:56:02Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-03-12T17:56:02Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=69affbe67f8df86939bc995d8885a7284a013387'/>
<id>urn:sha1:69affbe67f8df86939bc995d8885a7284a013387</id>
<content type='text'>
Code clean-up.

* kj/path-micro-code-cleanup:
  path: remove redundant function calls
  path: use size_t for dir_prefix length
  path: remove unused header
</content>
</entry>
<entry>
<title>Merge branch 'pw/no-more-NULL-means-current-worktree'</title>
<updated>2026-03-04T18:53:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-03-04T18:53:00Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=7b7d67104e315437c46e62986e163c97c5a51dd3'/>
<id>urn:sha1:7b7d67104e315437c46e62986e163c97c5a51dd3</id>
<content type='text'>
API clean-up for the worktree subsystem.

* pw/no-more-NULL-means-current-worktree:
  path: remove repository argument from worktree_git_path()
  wt-status: avoid passing NULL worktree
</content>
</entry>
<entry>
<title>path: remove redundant function calls</title>
<updated>2026-03-04T17:06:30Z</updated>
<author>
<name>K Jayatheerth</name>
<email>jayatheerthkulkarni2005@gmail.com</email>
</author>
<published>2026-03-04T13:05:02Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=b22ed4c4f9667d400744d0ab013745720d91b8d4'/>
<id>urn:sha1:b22ed4c4f9667d400744d0ab013745720d91b8d4</id>
<content type='text'>
repo_settings_get_shared_repository() is invoked multiple times in
calc_shared_perm(). While the function internally caches the value,
repeated calls still add unnecessary noise.

Store the result in a local variable and reuse it instead. This makes
it explicit that the value is expected to remain constant and avoids
repeated calls in the same scope.

Signed-off-by: K Jayatheerth &lt;jayatheerthkulkarni2005@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>path: use size_t for dir_prefix length</title>
<updated>2026-03-04T17:06:30Z</updated>
<author>
<name>K Jayatheerth</name>
<email>jayatheerthkulkarni2005@gmail.com</email>
</author>
<published>2026-03-04T13:05:01Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=61d0b79e4c2dffa27c89b409aaa084deb0ed2172'/>
<id>urn:sha1:61d0b79e4c2dffa27c89b409aaa084deb0ed2172</id>
<content type='text'>
The strlen() function returns a size_t. Storing this in a standard
signed int is a bad practice that invites overflow vulnerabilities if
paths get absurdly long.

Switch the variable to size_t. This is safe to do because 'len' is
strictly used as an argument to strncmp() (which expects size_t) and
as a positive array index, involving no signed arithmetic that could
rely on negative values.

Signed-off-by: K Jayatheerth &lt;jayatheerthkulkarni2005@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>path: remove unused header</title>
<updated>2026-03-04T17:06:29Z</updated>
<author>
<name>K Jayatheerth</name>
<email>jayatheerthkulkarni2005@gmail.com</email>
</author>
<published>2026-03-04T13:05:00Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=99a626f479781da77ea41f356bd35a27af8ec11b'/>
<id>urn:sha1:99a626f479781da77ea41f356bd35a27af8ec11b</id>
<content type='text'>
The "environment.h" header is included in "path.c", but none of the
functions or macros it provides are used in this file.

Signed-off-by: K Jayatheerth &lt;jayatheerthkulkarni2005@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>path: factor out skip_slashes() in normalize_path_copy_len()</title>
<updated>2026-02-22T05:25:56Z</updated>
<author>
<name>Pushkar Singh</name>
<email>pushkarkumarsingh1970@gmail.com</email>
</author>
<published>2026-02-21T11:05:12Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=40b30f245d57f89215f89c29b72e8b557f09b82a'/>
<id>urn:sha1:40b30f245d57f89215f89c29b72e8b557f09b82a</id>
<content type='text'>
Extract skip_slashes() to avoid repeating the same is_dir_sep()
loop in multiple places inside normalize_path_copy_len().

Keep the dot-component handling inline to preserve the original
control flow and readability, as suggested in review.

No functional changes. Behavior verified with t0060-path-utils.sh.

Signed-off-by: Pushkar Singh &lt;pushkarkumarsingh1970@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>path: remove repository argument from worktree_git_path()</title>
<updated>2026-02-19T19:03:24Z</updated>
<author>
<name>Phillip Wood</name>
<email>phillip.wood@dunelm.org.uk</email>
</author>
<published>2026-02-19T14:26:33Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=a49cb0f093809e3e66566f161aa930f37346775d'/>
<id>urn:sha1:a49cb0f093809e3e66566f161aa930f37346775d</id>
<content type='text'>
worktree_git_path() takes a struct repository and a struct worktree
which also contains a struct repository. The repository argument
was added by a973f60dc7c (path: stop relying on `the_repository` in
`worktree_git_path()`, 2024-08-13) and exists because the worktree
argument is optional. Having two ways of passing a repository is
a potential foot-gun as if the the worktree argument is present the
repository argument must match the worktree's repository member. Since
the last commit there are no callers that pass a NULL worktree so lets
remove the repository argument. This removes the potential confusion
and lets us delete a number of uses of "the_repository".

worktree_git_path() has the following callers:

 - builtin/worktree.c:validate_no_submodules() which is called from
   check_clean_worktree() and move_worktree(), both of which supply
   a non-NULL worktree.

 - builtin/fsck.c:cmd_fsck() which loops over all worktrees.

 - revision.c:add_index_objects_to_pending() which loops over all
   worktrees.

 - worktree.c:worktree_lock_reason() which dereferences wt before
   calling worktree_git_path().

 - wt-status.c:wt_status_check_bisect() and wt_status_check_rebase()
   which are always called with a non-NULL worktree after the last
   commit.

 - wt-status.c:git_branch() which is only called by
   wt_status_check_bisect() and wt_status_check_rebase().

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>path: move `enter_repo()` into "setup.c"</title>
<updated>2025-11-20T01:41:03Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-11-19T07:50:49Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=831e02340b9de46c9ea0a1bbce3894f390f5a45e'/>
<id>urn:sha1:831e02340b9de46c9ea0a1bbce3894f390f5a45e</id>
<content type='text'>
The function `enter_repo()` is used to enter a repository at a given
path. As such it sits way closer to setting up a repository than it does
with handling paths, but regardless of that it's located in "path.c"
instead of in "setup.c".

Move the function into "setup.c".

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>object-store: rename files to "odb.{c,h}"</title>
<updated>2025-07-01T21:46:34Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-07-01T12:22:15Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=8f49151763cb81adf4bcec53c1ae67057081b02d'/>
<id>urn:sha1:8f49151763cb81adf4bcec53c1ae67057081b02d</id>
<content type='text'>
In the preceding commits we have renamed the structures contained in
"object-store.h" to `struct object_database` and `struct odb_backend`.
As such, the code files "object-store.{c,h}" are confusingly named now.
Rename them to "odb.{c,h}" 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>
