<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/commit.c, branch v2.45.3</title>
<subtitle>Fork of git SCM with my patches.</subtitle>
<id>http://git.kilabit.info/git/atom?h=v2.45.3</id>
<link rel='self' href='http://git.kilabit.info/git/atom?h=v2.45.3'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/'/>
<updated>2024-07-02T16:27:59Z</updated>
<entry>
<title>Merge branch 'rs/remove-unused-find-header-mem' into maint-2.45</title>
<updated>2024-07-02T16:27:59Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-07-02T16:27:59Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=2c2ddfb725929a58b71f01c86a38d02eb7e45d34'/>
<id>urn:sha1:2c2ddfb725929a58b71f01c86a38d02eb7e45d34</id>
<content type='text'>
Code clean-up.

* rs/remove-unused-find-header-mem:
  commit: remove find_header_mem()
</content>
</entry>
<entry>
<title>commit: remove find_header_mem()</title>
<updated>2024-06-20T18:12:40Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2024-06-19T17:13:19Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=28dc26dc337932d9e4df8f83f1e454ea6bbc0897'/>
<id>urn:sha1:28dc26dc337932d9e4df8f83f1e454ea6bbc0897</id>
<content type='text'>
cfc5cf428b (receive-pack.c: consolidate find header logic, 2022-01-06)
introduced find_header_mem() and turned find_commit_header() into a thin
wrapper.  Since then, the latter has become the last remaining caller of
the former.  Remove it to restore find_commit_header() to the state
before cfc5cf428b, get rid of a strlen(3) call and resolve a NEEDSWORK
note in the process.

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Acked-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 'jk/core-comment-string'</title>
<updated>2024-04-05T17:49:49Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-04-05T17:49:49Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=dce1e0b6daaa872a3b88724d9aa1b087c95e8754'/>
<id>urn:sha1:dce1e0b6daaa872a3b88724d9aa1b087c95e8754</id>
<content type='text'>
core.commentChar used to be limited to a single byte, but has been
updated to allow an arbitrary multi-byte sequence.

* jk/core-comment-string:
  config: add core.commentString
  config: allow multi-byte core.commentChar
  environment: drop comment_line_char compatibility macro
  wt-status: drop custom comment-char stringification
  sequencer: handle multi-byte comment characters when writing todo list
  find multi-byte comment chars in unterminated buffers
  find multi-byte comment chars in NUL-terminated strings
  prefer comment_line_str to comment_line_char for printing
  strbuf: accept a comment string for strbuf_add_commented_lines()
  strbuf: accept a comment string for strbuf_commented_addf()
  strbuf: accept a comment string for strbuf_stripspace()
  environment: store comment_line_char as a string
  strbuf: avoid shadowing global comment_line_char name
  commit: refactor base-case of adjust_comment_line_char()
  strbuf: avoid static variables in strbuf_add_commented_lines()
  strbuf: simplify comment-handling in add_lines() helper
  config: forbid newline as core.commentChar
</content>
</entry>
<entry>
<title>Merge branch 'eb/hash-transition'</title>
<updated>2024-03-28T21:13:50Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-03-28T21:13:50Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=1002f28a527d33893f7dab068dbac7011f84af65'/>
<id>urn:sha1:1002f28a527d33893f7dab068dbac7011f84af65</id>
<content type='text'>
Work to support a repository that work with both SHA-1 and SHA-256
hash algorithms has started.

* eb/hash-transition: (30 commits)
  t1016-compatObjectFormat: add tests to verify the conversion between objects
  t1006: test oid compatibility with cat-file
  t1006: rename sha1 to oid
  test-lib: compute the compatibility hash so tests may use it
  builtin/ls-tree: let the oid determine the output algorithm
  object-file: handle compat objects in check_object_signature
  tree-walk: init_tree_desc take an oid to get the hash algorithm
  builtin/cat-file: let the oid determine the output algorithm
  rev-parse: add an --output-object-format parameter
  repository: implement extensions.compatObjectFormat
  object-file: update object_info_extended to reencode objects
  object-file-convert: convert commits that embed signed tags
  object-file-convert: convert commit objects when writing
  object-file-convert: don't leak when converting tag objects
  object-file-convert: convert tag objects when writing
  object-file-convert: add a function to convert trees between algorithms
  object: factor out parse_mode out of fast-import and tree-walk into in object.h
  cache: add a function to read an OID of a specific algorithm
  tag: sign both hashes
  commit: export add_header_signature to support handling signatures on tags
  ...
</content>
</entry>
<entry>
<title>find multi-byte comment chars in unterminated buffers</title>
<updated>2024-03-12T20:28:10Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2024-03-12T09:17:39Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=2ec225d397d564d9c6bb907d85a58507dec75989'/>
<id>urn:sha1:2ec225d397d564d9c6bb907d85a58507dec75989</id>
<content type='text'>
As with the previous patch, we need to swap out single-byte matching for
something like starts_with() to match all bytes of a multi-byte comment
character. But for cases where the buffer is not NUL-terminated (and we
instead have an explicit size or end pointer), it's not safe to use
starts_with(), as it might walk off the end of the buffer.

Let's introduce a new starts_with_mem() that does the same thing but
also accepts the length of the "haystack" str and makes sure not to walk
past it.

Note that in most cases the existing code did not need a length check at
all, since it was written in a way that knew we had at least one byte
available (and that was all we checked). So I had to read each one to
find the appropriate bounds. The one exception is sequencer.c's
add_commented_lines(), where we can actually get rid of the length
check. Just like starts_with(), our starts_with_mem() handles an empty
haystack variable by not matching (assuming a non-empty prefix).

A few notes on the implementation of starts_with_mem():

  - it would be equally correct to take an "end" pointer (and indeed,
    many of the callers have this and have to subtract to come up with
    the length). I think taking a ptr/size combo is a more usual
    interface for our codebase, though, and has the added benefit that
    the function signature makes it harder to mix up the three
    parameters.

  - we could obviously build starts_with() on top of this by passing
    strlen(str) as the length. But it's possible that starts_with() is a
    relatively hot code path, and it should not pay that penalty (it can
    generally return an answer proportional to the size of the prefix,
    not the whole string).

  - it naively feels like xstrncmpz() should be able to do the same
    thing, but that's not quite true. If you pass the length of the
    haystack buffer, then strncmp() finds that a shorter prefix string
    is "less than" than the haystack, even if the haystack starts with
    the prefix. If you pass the length of the prefix, then you risk
    reading past the end of the haystack if it is shorter than the
    prefix. So I think we really do need a new function.

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>commit-reach(repo_get_merge_bases_many): pass on "missing commits" errors</title>
<updated>2024-02-29T16:06:01Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2024-02-28T09:44:16Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=531738052158fd66bc9b65534309f5c0a9d2808d'/>
<id>urn:sha1:531738052158fd66bc9b65534309f5c0a9d2808d</id>
<content type='text'>
The `merge_bases_many()` function was just taught to indicate parsing
errors, and now the `repo_get_merge_bases_many()` function is aware of
that, too.

Naturally, there are a lot of callers that need to be adjusted now, too.

Next stop: `repo_get_merge_bases_dirty()`.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'en/header-cleanup' into maint-2.43</title>
<updated>2024-02-09T00:22:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-02-09T00:22:10Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=0f7a10a3aad344a28f0f30b32a979925a9629533'/>
<id>urn:sha1:0f7a10a3aad344a28f0f30b32a979925a9629533</id>
<content type='text'>
Remove unused header "#include".

* en/header-cleanup:
  treewide: remove unnecessary includes in source files
  treewide: add direct includes currently only pulled in transitively
  trace2/tr2_tls.h: remove unnecessary include
  submodule-config.h: remove unnecessary include
  pkt-line.h: remove unnecessary include
  line-log.h: remove unnecessary include
  http.h: remove unnecessary include
  fsmonitor--daemon.h: remove unnecessary includes
  blame.h: remove unnecessary includes
  archive.h: remove unnecessary include
  treewide: remove unnecessary includes in source files
  treewide: remove unnecessary includes from header files
</content>
</entry>
<entry>
<title>Merge branch 'la/trailer-cleanups' into maint-2.43</title>
<updated>2024-02-09T00:22:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-02-09T00:22:09Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=541d0d75e781fad5761414d7a5500b8840f3e5bb'/>
<id>urn:sha1:541d0d75e781fad5761414d7a5500b8840f3e5bb</id>
<content type='text'>
Code clean-up.

* la/trailer-cleanups:
  trailer: use offsets for trailer_start/trailer_end
  trailer: find the end of the log message
  commit: ignore_non_trailer computes number of bytes to ignore
</content>
</entry>
<entry>
<title>Merge branch 'en/header-cleanup'</title>
<updated>2024-01-08T22:05:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-01-08T22:05:15Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=492ee03f60297e7e83d101f4519ab8abc98782bc'/>
<id>urn:sha1:492ee03f60297e7e83d101f4519ab8abc98782bc</id>
<content type='text'>
Remove unused header "#include".

* en/header-cleanup:
  treewide: remove unnecessary includes in source files
  treewide: add direct includes currently only pulled in transitively
  trace2/tr2_tls.h: remove unnecessary include
  submodule-config.h: remove unnecessary include
  pkt-line.h: remove unnecessary include
  line-log.h: remove unnecessary include
  http.h: remove unnecessary include
  fsmonitor--daemon.h: remove unnecessary includes
  blame.h: remove unnecessary includes
  archive.h: remove unnecessary include
  treewide: remove unnecessary includes in source files
  treewide: remove unnecessary includes from header files
</content>
</entry>
<entry>
<title>Merge branch 'la/trailer-cleanups'</title>
<updated>2024-01-02T21:51:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-01-02T21:51:29Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=59a29e1274948bf9a3ef44c65903d09194464e1c'/>
<id>urn:sha1:59a29e1274948bf9a3ef44c65903d09194464e1c</id>
<content type='text'>
Code clean-up.

* la/trailer-cleanups:
  trailer: use offsets for trailer_start/trailer_end
  trailer: find the end of the log message
  commit: ignore_non_trailer computes number of bytes to ignore
</content>
</entry>
</feed>
