<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/pack-bitmap.c, branch v2.32.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.32.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.32.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2021-05-07T03:47:41Z</updated>
<entry>
<title>Merge branch 'ps/rev-list-object-type-filter'</title>
<updated>2021-05-07T03:47:41Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-05-07T03:47:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8585d6c04aa903526b4b3554e90d6381ec62390a'/>
<id>urn:sha1:8585d6c04aa903526b4b3554e90d6381ec62390a</id>
<content type='text'>
"git rev-list" learns the "--filter=object:type=&lt;type&gt;" option,
which can be used to exclude objects of the given kind from the
packfile generated by pack-objects.

* ps/rev-list-object-type-filter:
  rev-list: allow filtering of provided items
  pack-bitmap: implement combined filter
  pack-bitmap: implement object type filter
  list-objects: implement object type filter
  list-objects: support filtering by tag and commit
  list-objects: move tag processing into its own function
  revision: mark commit parents as NOT_USER_GIVEN
  uploadpack.txt: document implication of `uploadpackfilter.allow`
</content>
</entry>
<entry>
<title>Merge branch 'jk/prune-with-bitmap-fix'</title>
<updated>2021-05-07T03:47:38Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-05-07T03:47:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6e08cbdf3857ea2b335c96f515743090ed58c709'/>
<id>urn:sha1:6e08cbdf3857ea2b335c96f515743090ed58c709</id>
<content type='text'>
When the reachability bitmap is in effect, the "do not lose
recently created objects and those that are reachable from them"
safety to protect us from races were disabled by mistake, which has
been corrected.

* jk/prune-with-bitmap-fix:
  prune: save reachable-from-recent objects with bitmaps
  pack-bitmap: clean up include_check after use
</content>
</entry>
<entry>
<title>pack-bitmap: clean up include_check after use</title>
<updated>2021-04-29T01:03:46Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2021-04-28T15:42:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1e951c647365be2e93bceddf7bd13173ed2cb1ce'/>
<id>urn:sha1:1e951c647365be2e93bceddf7bd13173ed2cb1ce</id>
<content type='text'>
When a bitmap walk has to traverse (to fill in non-bitmapped objects),
we use rev_info's include_check mechanism to let us stop the traversal
early. But after setting the function and its data parameter, we never
clean it up. This means that if the rev_info is used for a subsequent
traversal without bitmaps, it will unexpectedly call into our
include_check function (worse, it will do so pointing to a now-defunct
stack variable in include_check_data, likely resulting in a segfault).

There's no code which does this now, but it's an accident waiting to
happen. Let's clean up after ourselves in the bitmap code.

Reported-by: David Emett &lt;dave@sp4m.net&gt;
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>rev-list: allow filtering of provided items</title>
<updated>2021-04-19T21:09:11Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2021-04-19T11:47:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9cf68b27d50c29a0370bd61581d350b0b0a18e85'/>
<id>urn:sha1:9cf68b27d50c29a0370bd61581d350b0b0a18e85</id>
<content type='text'>
When providing an object filter, it is currently impossible to also
filter provided items. E.g. when executing `git rev-list HEAD` , the
commit this reference points to will be treated as user-provided and is
thus excluded from the filtering mechanism. This makes it harder than
necessary to properly use the new `--filter=object:type` filter given
that even if the user wants to only see blobs, he'll still see commits
of provided references.

Improve this by introducing a new `--filter-provided-objects` option
to the git-rev-parse(1) command. If given, then all user-provided
references will be subject to filtering.

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>pack-bitmap: implement combined filter</title>
<updated>2021-04-19T21:09:11Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2021-04-19T11:47:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=169a15ebd66dd23bf8c379ad33bced1578c848ef'/>
<id>urn:sha1:169a15ebd66dd23bf8c379ad33bced1578c848ef</id>
<content type='text'>
When the user has multiple objects filters specified, then this is
internally represented by having a "combined" filter. These combined
filters aren't yet supported by bitmap indices and can thus not be
accelerated.

Fix this by implementing support for these combined filters. The
implementation is quite trivial: when there's a combined filter, we
simply recurse into `filter_bitmap()` for all of the sub-filters.

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>pack-bitmap: implement object type filter</title>
<updated>2021-04-19T21:09:11Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2021-04-19T11:46:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7ab6aafa582b9c537885d4a6ef2c837323c5014d'/>
<id>urn:sha1:7ab6aafa582b9c537885d4a6ef2c837323c5014d</id>
<content type='text'>
The preceding commit has added a new object filter for git-rev-list(1)
which allows to filter objects by type. Implement the equivalent filter
for packfile bitmaps so that we can answer these queries fast.

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 'tb/pack-preferred-tips-to-give-bitmap'</title>
<updated>2021-04-13T22:28:50Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-04-13T22:28:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0623669fc6ddc6dc1ad706f135826f9a0910dd4b'/>
<id>urn:sha1:0623669fc6ddc6dc1ad706f135826f9a0910dd4b</id>
<content type='text'>
A configuration variable has been added to force tips of certain
refs to be given a reachability bitmap.

* tb/pack-preferred-tips-to-give-bitmap:
  builtin/pack-objects.c: respect 'pack.preferBitmapTips'
  t/helper/test-bitmap.c: initial commit
  pack-bitmap: add 'test_bitmap_commits()' helper
</content>
</entry>
<entry>
<title>Merge branch 'ps/pack-bitmap-optim'</title>
<updated>2021-04-07T23:54:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-04-07T23:54:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=58840e62a4c3fda3ec6c9ed4b34795aaafb73afc'/>
<id>urn:sha1:58840e62a4c3fda3ec6c9ed4b34795aaafb73afc</id>
<content type='text'>
Optimize "rev-list --use-bitmap-index --objects" corner case that
uses negative tags as the stopping points.

* ps/pack-bitmap-optim:
  pack-bitmap: avoid traversal of objects referenced by uninteresting tag
</content>
</entry>
<entry>
<title>builtin/pack-objects.c: respect 'pack.preferBitmapTips'</title>
<updated>2021-04-01T06:14:03Z</updated>
<author>
<name>Taylor Blau</name>
<email>me@ttaylorr.com</email>
</author>
<published>2021-04-01T01:32:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3f267a112820f3bdf6b82362680ea6339f0e5f86'/>
<id>urn:sha1:3f267a112820f3bdf6b82362680ea6339f0e5f86</id>
<content type='text'>
When writing a new pack with a bitmap, it is sometimes convenient to
indicate some reference prefixes which should receive priority when
selecting which commits to receive bitmaps.

A truly motivated caller could accomplish this by setting
'pack.islandCore', (since all commits in the core island are similarly
marked as preferred) but this requires callers to opt into using delta
islands, which they may or may not want to do.

Introduce a new multi-valued configuration, 'pack.preferBitmapTips' to
allow callers to specify a list of reference prefixes. All references
which have a prefix contained in 'pack.preferBitmapTips' will mark their
tips as "preferred" in the same way as commits are marked as preferred
for selection by 'pack.islandCore'.

The choice of the verb "prefer" is intentional: marking the NEEDS_BITMAP
flag on an object does *not* guarantee that that object will receive a
bitmap. It merely guarantees that that commit will receive a bitmap over
any *other* commit in the same window by bitmap_writer_select_commits().

The test this patch adds reflects this quirk, too. It only tests that
a commit (which didn't receive bitmaps by default) is selected for
bitmaps after changing the value of 'pack.preferBitmapTips' to include
it. Other commits may lose their bitmaps as a byproduct of how the
selection process works (bitmap_writer_select_commits() ignores the
remainder of a window after seeing a commit with the NEEDS_BITMAP flag).

This configuration will aide in selecting important references for
multi-pack bitmaps, since they do not respect the same pack.islandCore
configuration. (They could, but doing so may be confusing, since it is
packs--not bitmaps--which are influenced by the delta-islands
configuration).

In a fork network repository (one which lists all forks of a given
repository as remotes), for example, it is useful to set
pack.preferBitmapTips to 'refs/remotes/&lt;root&gt;/heads' and
'refs/remotes/&lt;root&gt;/tags', where '&lt;root&gt;' is an opaque identifier
referring to the repository which is at the base of the fork chain.

Suggested-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>pack-bitmap: add 'test_bitmap_commits()' helper</title>
<updated>2021-04-01T06:14:03Z</updated>
<author>
<name>Taylor Blau</name>
<email>me@ttaylorr.com</email>
</author>
<published>2021-04-01T01:32:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dff5e49e51bfddbbeb5ed1f07031ccbd0bc216dc'/>
<id>urn:sha1:dff5e49e51bfddbbeb5ed1f07031ccbd0bc216dc</id>
<content type='text'>
The next patch will add a 'bitmap' test-tool which prints the list of
commits that have bitmaps computed.

The test helper could implement this itself, but it would need access to
the 'bitmaps' field of the 'pack_bitmap' struct. To avoid exposing this
private detail, implement the entirety of the helper behind a
test_bitmap_commits() function in pack-bitmap.c.

There is some precedence for this with test_bitmap_walk() which is used
to implement the '--test-bitmap' flag in 'git rev-list' (and is also
implemented in pack-bitmap.c).

A caller will be added in the next patch.

Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
