<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/oidset.h, branch jch</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=jch</id>
<link rel='self' href='https://git.shady.money/git/atom?h=jch'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2025-11-25T20:15:59Z</updated>
<entry>
<title>oidset: introduce `oidset_equal()`</title>
<updated>2025-11-25T20:15:59Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-11-19T07:50:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5d795b34dcbf46039c3dda028bb8df8d75a5a9d0'/>
<id>urn:sha1:5d795b34dcbf46039c3dda028bb8df8d75a5a9d0</id>
<content type='text'>
Introduce a new function that allows the caller to verify whether two
oidsets contain the exact same object IDs.

Note that this change requires us to change `oidset_iter_init()` to
accept a `const struct oidset`.

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>oidset: pass hash algorithm when parsing file</title>
<updated>2024-06-14T17:26:34Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-06-14T06:50:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f2c32a66f508586a9233dc6eac27bc4689e67dc1'/>
<id>urn:sha1:f2c32a66f508586a9233dc6eac27bc4689e67dc1</id>
<content type='text'>
The `oidset_parse_file_carefully()` function implicitly depends on
`the_repository` when parsing object IDs. Fix this by having callers
pass in the hash algorithm to use.

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>oidset: refactor oidset_insert_from_set()</title>
<updated>2024-02-14T17:39:14Z</updated>
<author>
<name>Christian Couder</name>
<email>christian.couder@gmail.com</email>
</author>
<published>2024-02-14T14:25:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=eaf07b7d15e067305d33150eb98bf0351f9f4cbd'/>
<id>urn:sha1:eaf07b7d15e067305d33150eb98bf0351f9f4cbd</id>
<content type='text'>
In a following commit, we will need to add all the oids from a set into
another set. In "list-objects-filter.c", there is already a static
function called add_all() to do that.

Let's rename this function oidset_insert_from_set() and move it into
oidset.{c,h} to make it generally available.

While at it, let's remove a useless `!= NULL`.

Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>oidset: make oidset_size() an inline function</title>
<updated>2021-09-12T23:14:32Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2021-09-11T20:36:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=325006f2dbeb482f422b2c0e62b485a41cb1c64b'/>
<id>urn:sha1:325006f2dbeb482f422b2c0e62b485a41cb1c64b</id>
<content type='text'>
oidset_size() just reads a single word from memory and returns it.
Avoid the function call overhead for this trivial operation by turning
it into an inline function.

While we're at it, declare its parameter const to allow it to be used
on read-only oidsets.

Suggested-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>blame: validate and peel the object names on the ignore list</title>
<updated>2020-09-25T05:20:58Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-09-25T04:55:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=610e2b924020fe2d6a55e7ca6651f309b85c2d1d'/>
<id>urn:sha1:610e2b924020fe2d6a55e7ca6651f309b85c2d1d</id>
<content type='text'>
The command reads list of object names to place on the ignore list
either from the command line or from a file, but they are not
checked with their object type (those read from the file are not
even checked for object existence).

Extend the oidset_parse_file() API and allow it to take a callback
that can be used to die (e.g. when an inappropriate input is read)
or modify the object name read (e.g. when a tag pointing at a commit
is read, and the caller wants a commit object name), and use it in
the code that handles ignore list.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'tb/commit-graph-split-strategy'</title>
<updated>2020-05-01T20:39:52Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-05-01T20:39:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6a1c17d05b0e67fa5f9661f492f407b984496b27'/>
<id>urn:sha1:6a1c17d05b0e67fa5f9661f492f407b984496b27</id>
<content type='text'>
"git commit-graph write" learned different ways to write out split
files.

* tb/commit-graph-split-strategy:
  Revert "commit-graph.c: introduce '--[no-]check-oids'"
  commit-graph.c: introduce '--[no-]check-oids'
  commit-graph.h: replace 'commit_hex' with 'commits'
  oidset: introduce 'oidset_size'
  builtin/commit-graph.c: introduce split strategy 'replace'
  builtin/commit-graph.c: introduce split strategy 'no-merge'
  builtin/commit-graph.c: support for '--split[=&lt;strategy&gt;]'
  t/helper/test-read-graph.c: support commit-graph chains
</content>
</entry>
<entry>
<title>Merge branch 'jk/oid-array-cleanups'</title>
<updated>2020-04-22T20:42:49Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-04-22T20:42:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a768f866e9233b758cb21e25c7b8c985b0009c1f'/>
<id>urn:sha1:a768f866e9233b758cb21e25c7b8c985b0009c1f</id>
<content type='text'>
Code cleanup.

* jk/oid-array-cleanups:
  oidset: stop referring to sha1-array
  ref-filter: stop referring to "sha1 array"
  bisect: stop referring to sha1_array
  test-tool: rename sha1-array to oid-array
  oid_array: rename source file from sha1-array
  oid_array: use size_t for iteration
  oid_array: use size_t for count and allocation
</content>
</entry>
<entry>
<title>oidset: introduce 'oidset_size'</title>
<updated>2020-04-15T16:20:29Z</updated>
<author>
<name>Taylor Blau</name>
<email>me@ttaylorr.com</email>
</author>
<published>2020-04-14T04:04:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f4781068faafad5e10fb6e8ae312ebd5b0e7bb55'/>
<id>urn:sha1:f4781068faafad5e10fb6e8ae312ebd5b0e7bb55</id>
<content type='text'>
Occasionally, it may be useful for callers to know the number of object
IDs in an oidset. Right now, the only way to compute this is to call
'kh_size' on the internal 'kh_set_oid_t'.

Similar to how we wrap other 'kh_*' functions over the 'oidset' type,
let's allow callers to compute this value by introducing 'oidset_size'.

We will add its first caller in the subsequent commit.

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>oidset: stop referring to sha1-array</title>
<updated>2020-03-30T17:59:08Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2020-03-30T14:04:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0740d0a5d3046e28b8d49baafafe521c5fc81711'/>
<id>urn:sha1:0740d0a5d3046e28b8d49baafafe521c5fc81711</id>
<content type='text'>
Ths has been oid_array for some time, though the source only recently
moved from sha1-array.[ch] to oid-array.[ch]. In either case, we should
say "oid-array" here.

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>Merge branch 'en/oidset-uninclude-hashmap'</title>
<updated>2020-03-25T20:57:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-03-25T20:57:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=883e23820ed21b4ae65463f2a87152285bf77937'/>
<id>urn:sha1:883e23820ed21b4ae65463f2a87152285bf77937</id>
<content type='text'>
Code clean-up.

* en/oidset-uninclude-hashmap:
  oidset: remove unnecessary include
</content>
</entry>
</feed>
