<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/rev-parse.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-26T19:47:17Z</updated>
<entry>
<title>rev-parse: avoid writing to const string for parent marks</title>
<updated>2026-03-26T19:47:17Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2026-03-26T19:14:24Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=213b2138770d820bc28fde839f3e4df90a5d5d81'/>
<id>urn:sha1:213b2138770d820bc28fde839f3e4df90a5d5d81</id>
<content type='text'>
The previous commit cleared up some const confusion in handling parent
marks in revision.c, but we have roughly the same code duplicated in
rev-parse. This one is much easier to fix, because the handling of the
shortened string is all done in one place, after detecting any marks
(but without shortening the string between marks).

  As a side note, I suspect this means that it behaves differently than
  the revision.c parser for weird stuff like "foo^!^@^-", but that is
  outside the scope of this patch.

While we are here, let's also rename the variable "dotdot", which is
totally misleading (and which we already fixed in revision.c long ago
via f632dedd8d (handle_revision_arg: stop using "dotdot" as a generic
pointer, 2017-05-19)).

Doing that here makes the diff a little messier, but it also lets the
compiler help us make sure we did not miss any stray mentions of the
variable while we are changing its semantics.

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-parse: simplify dotdot parsing</title>
<updated>2026-03-26T19:47:17Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2026-03-26T19:05:25Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=268a9caaf29f0269147dacbea2c8d439c505c5ee'/>
<id>urn:sha1:268a9caaf29f0269147dacbea2c8d439c505c5ee</id>
<content type='text'>
The previous commit simplified the way that revision.c parses ".." and
"..." range operators. But there's roughly similar code in rev-parse.
This is less likely to trigger a segfault, as there is no library
function which we'd pass a string literal to, but it still causes the
compiler to complain about laundering away constness via strstr().

Let's give it the same treatment, copying the left-hand side of the
range operator into its own string.

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>refs: replace `refs_for_each_fullref_in()`</title>
<updated>2026-02-23T21:21:19Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2026-02-23T11:59:51Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=1dd4f1e43f8f11ebb13c1b9edbd91219a134443d'/>
<id>urn:sha1:1dd4f1e43f8f11ebb13c1b9edbd91219a134443d</id>
<content type='text'>
Replace calls to `refs_for_each_fullref_in()` with the newly introduced
`refs_for_each_ref_ext()` function.

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>refs: replace `refs_for_each_glob_ref_in()`</title>
<updated>2026-02-23T21:21:19Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2026-02-23T11:59:48Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=4091d2989353aaf14080ee64ee2e94b60ceaf18d'/>
<id>urn:sha1:4091d2989353aaf14080ee64ee2e94b60ceaf18d</id>
<content type='text'>
Replace calls to `refs_for_each_glob_ref_in()` with the newly introduced
`refs_for_each_ref_ext()` function.

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>refs: replace `refs_for_each_ref_in()`</title>
<updated>2026-02-23T21:21:18Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2026-02-23T11:59:45Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=00be226f1f2a1036ea3920f8700b23b7cc55bf57'/>
<id>urn:sha1:00be226f1f2a1036ea3920f8700b23b7cc55bf57</id>
<content type='text'>
Replace calls to `refs_for_each_ref_in()` with the newly introduced
`refs_for_each_ref_ext()` function.

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 'ps/ref-peeled-tags'</title>
<updated>2025-11-19T18:55:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-11-19T18:55:39Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=13134cecb08604fc2a4d30b6f9f941f6323e6de2'/>
<id>urn:sha1:13134cecb08604fc2a4d30b6f9f941f6323e6de2</id>
<content type='text'>
Some ref backend storage can hold not just the object name of an
annotated tag, but the object name of the object the tag points at.
The code to handle this information has been streamlined.

* ps/ref-peeled-tags:
  t7004: do not chdir around in the main process
  ref-filter: fix stale parsed objects
  ref-filter: parse objects on demand
  ref-filter: detect broken tags when dereferencing them
  refs: don't store peeled object IDs for invalid tags
  object: add flag to `peel_object()` to verify object type
  refs: drop infrastructure to peel via iterators
  refs: drop `current_ref_iter` hack
  builtin/show-ref: convert to use `reference_get_peeled_oid()`
  ref-filter: propagate peeled object ID
  upload-pack: convert to use `reference_get_peeled_oid()`
  refs: expose peeled object ID via the iterator
  refs: refactor reference status flags
  refs: fully reset `struct ref_iterator::ref` on iteration
  refs: introduce `.ref` field for the base iterator
  refs: introduce wrapper struct for `each_ref_fn`
</content>
</entry>
<entry>
<title>refs: introduce wrapper struct for `each_ref_fn`</title>
<updated>2025-11-04T15:32:24Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-10-23T07:16:10Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=bdbebe5714b25dc9d215b48efbb80f410925d7dd'/>
<id>urn:sha1:bdbebe5714b25dc9d215b48efbb80f410925d7dd</id>
<content type='text'>
The `each_ref_fn` callback function type is used across our code base
for several different functions that iterate through reference. There's
a bunch of callbacks implementing this type, which makes any changes to
the callback signature extremely noisy. An example of the required churn
is e8207717f1 (refs: add referent to each_ref_fn, 2024-08-09): adding a
single argument required us to change 48 files.

It was already proposed back then [1] that we might want to introduce a
wrapper structure to alleviate the pain going forward. While this of
course requires the same kind of global refactoring as just introducing
a new parameter, it at least allows us to more change the callback type
afterwards by just extending the wrapper structure.

One counterargument to this refactoring is that it makes the structure
more opaque. While it is obvious which callsites need to be fixed up
when we change the function type, it's not obvious anymore once we use
a structure. That being said, we only have a handful of sites that
actually need to populate this wrapper structure: our ref backends,
"refs/iterator.c" as well as very few sites that invoke the iterator
callback functions directly.

Introduce this wrapper structure so that we can adapt the iterator
interfaces more readily.

[1]: &lt;ZmarVcF5JjsZx0dl@tanuki&gt;

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 'bc/sha1-256-interop-01'</title>
<updated>2025-10-22T18:38:58Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-10-22T18:38:58Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=98401c10fc9e991b36c4ccf5a270746f123feeb6'/>
<id>urn:sha1:98401c10fc9e991b36c4ccf5a270746f123feeb6</id>
<content type='text'>
The beginning of SHA1-SHA256 interoperability work.

* bc/sha1-256-interop-01:
  t1010: use BROKEN_OBJECTS prerequisite
  t: allow specifying compatibility hash
  fsck: consider gpgsig headers expected in tags
  rev-parse: allow printing compatibility hash
  docs: add documentation for loose objects
  docs: improve ambiguous areas of pack format documentation
  docs: reflect actual double signature for tags
  docs: update offset order for pack index v3
  docs: update pack index v3 format
</content>
</entry>
<entry>
<title>rev-parse: allow printing compatibility hash</title>
<updated>2025-10-10T00:46:14Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2025-10-09T21:56:23Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=b95c59e21e6afeddc56400e162e818a9312f04d2'/>
<id>urn:sha1:b95c59e21e6afeddc56400e162e818a9312f04d2</id>
<content type='text'>
Right now, we have a way to print the storage hash, the input hash, and
the output hash, but we lack a way to print the compatibility hash.  Add
a new type to --show-object-format, compat, which prints this value.

If no compatibility hash exists, simply print a newline.  This is
important to allow users to use multiple options at once while still
getting unambiguous output.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>use repo_get_oid_with_flags()</title>
<updated>2025-09-10T21:29:49Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2025-09-10T17:16:30Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=a66fc22bf9b7f379fc68e23c54d42ac9b7eaa845'/>
<id>urn:sha1:a66fc22bf9b7f379fc68e23c54d42ac9b7eaa845</id>
<content type='text'>
get_oid_with_context() allows specifying flags and reports object
details via a passed-in struct object_context.  Some callers just want
to specify flags, but don't need any details back.  Convert them to
repo_get_oid_with_flags(), which provides just that and frees them from
dealing with the context structure.

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>
</feed>
