<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/oidset.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>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='http://git.kilabit.info/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='http://git.kilabit.info/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='http://git.kilabit.info/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>hex.h: move some hex-related declarations from cache.h</title>
<updated>2023-02-24T01:25:28Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-02-24T00:09:26Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=b73ecb48114926d063d7ab96943bafcc0ae913b6'/>
<id>urn:sha1:b73ecb48114926d063d7ab96943bafcc0ae913b6</id>
<content type='text'>
hex.c contains code for hex-related functions, but for some reason these
functions were declared in the catch-all cache.h.  Move the function
declarations into a hex.h header instead.

This also allows us to remove includes of cache.h from a few C files.
For now, we make cache.h include hex.h, so that it is easier to review
the direct changes being made by this patch.  In the next patch, we will
remove that, and add the necessary direct '#include "hex.h"' in the
hundreds of C files that need it.

Note that reviewing the header changes in this commit might be
simplified via
    git log --no-walk -p --color-moved $COMMIT -- '*.h'`
In particular, it highlights the simple movement of code in .h files
rather nicely.

Signed-off-by: Elijah Newren &lt;newren@gmail.com&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='http://git.kilabit.info/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: silently ignore invalid ignore file objects</title>
<updated>2020-11-10T21:05:06Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2020-11-10T11:38:27Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=c714d0587567d67e1c3702e44221c1b46dc969ff'/>
<id>urn:sha1:c714d0587567d67e1c3702e44221c1b46dc969ff</id>
<content type='text'>
Since 610e2b9240 (blame: validate and peel the object names on the
ignore list, 2020-09-24) git blame reports checks if objects specified
with --ignore-rev and in files loaded with --ignore-revs-file and config
option blame.ignoreRevsFile are actual objects and dies if they aren't.
The intent is to report typos to the user.

This also breaks the ability to use a single ignore file for multiple
repositories.  Typos are presumably less likely in files than on the
command line, so alerting is less useful here.  Restore that feature by
skipping non-commits without dying.

Reported-by: Jean-Yves Avenard &lt;jyavenard@mozilla.com&gt;
Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Reviewed-by: Barret Rhoden &lt;brho@google.com&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='http://git.kilabit.info/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>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='http://git.kilabit.info/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>Merge branch 'br/blame-ignore'</title>
<updated>2019-07-19T18:30:20Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-07-19T18:30:20Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=209f0755934a0c9b448408f9b7c9849c15041ecc'/>
<id>urn:sha1:209f0755934a0c9b448408f9b7c9849c15041ecc</id>
<content type='text'>
"git blame" learned to "ignore" commits in the history, whose
effects (as well as their presence) get ignored.

* br/blame-ignore:
  t8014: remove unnecessary braces
  blame: drop some unused function parameters
  blame: add a test to cover blame_coalesce()
  blame: use the fingerprint heuristic to match ignored lines
  blame: add a fingerprint heuristic to match ignored lines
  blame: optionally track line fingerprints during fill_blame_origin()
  blame: add config options for the output of ignored or unblamable lines
  blame: add the ability to ignore commits and their changes
  blame: use a helper function in blame_chunk()
  Move oidset_parse_file() to oidset.c
  fsck: rename and touch up init_skiplist()
</content>
</entry>
<entry>
<title>khash: rename kh_oid_t to kh_oid_set</title>
<updated>2019-06-20T17:27:48Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2019-06-20T07:41:28Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=8fbb558af4e911a9507295809a4d1d7d6687b6e1'/>
<id>urn:sha1:8fbb558af4e911a9507295809a4d1d7d6687b6e1</id>
<content type='text'>
khash lets us define a hash as either a map or a set (i.e., with no
"value" type). For the oid maps we define, "oid" is the set and
"oid_map" is the map. As the bug in the previous commit shows, it's easy
to pick the wrong one.

So let's make the names more distinct: "oid_set" and "oid_map".

An alternative naming scheme would be to actually name the type after
the key/value types. So e.g., "oid" _would_ be the set, since it has no
value type. And "oid_map" would become "oid_void" or similar (and
"oid_pos" becomes "oid_int"). That's better in some ways: it's more
regular, and a given map type can be more reasily reused in multiple
contexts (e.g., something storing an "int" that isn't a "pos"). But it's
also slightly less descriptive.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
