<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/trace2, 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-08-03T05:44:58Z</updated>
<entry>
<title>trace2: do not use strbuf_split*()</title>
<updated>2025-08-03T05:44:58Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-07-31T22:54:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=838fe56920684bf0ab734f7ddf2bad69cb5f5d45'/>
<id>urn:sha1:838fe56920684bf0ab734f7ddf2bad69cb5f5d45</id>
<content type='text'>
tr2_cfg_load_patterns() and tr2_load_env_vars() functions are
functions with very similar structure that each reads an environment
variable, splits its value at the ',' boundaries, and trims the
resulting string pieces into an array of strbufs.

But the code paths that later use these strbufs take no advantage of
the strbuf-ness of the result (they do not benefit from &lt;ptr,len&gt;
representation to avoid having to run strlen(&lt;ptr&gt;), for example).

Simplify the code by teaching these functions to split into a string
list instead; even the trimming comes for free ;-).

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>trace2: trim_trailing_newline followed by trim is a no-op</title>
<updated>2025-08-03T05:44:58Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-07-31T22:54:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cb8e82a6414653d5dbda81eedb8ca0cd9ce34c68'/>
<id>urn:sha1:cb8e82a6414653d5dbda81eedb8ca0cd9ce34c68</id>
<content type='text'>
strbuf_trim_trailing_newline() removes a LF or a CRLF from the tail
of a string.  If the code plans to call strbuf_trim() immediately
after doing so, the code is better off skipping the EOL trimming in
the first place.  After all, LF/CRLF at the end is a mere special
case of whitespaces at the end of the string, which will be removed
by strbuf_rtrim() anyway.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>trace2: avoid "futile conditional"</title>
<updated>2025-05-15T20:46:47Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2025-05-15T13:11:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fc451e6ea85310725532cbdbc280f8a56a7ec7df'/>
<id>urn:sha1:fc451e6ea85310725532cbdbc280f8a56a7ec7df</id>
<content type='text'>
CodeQL reports empty `if` blocks that only contain a comment as "futile
conditional". The comment talks about potential plans to turn this into
a warning, but that seems not to have been necessary. Replace the entire
construct with a concise comment.

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>trace2/tr2_sysenv.c: *.txt -&gt; *.adoc fixes</title>
<updated>2025-03-03T21:49:26Z</updated>
<author>
<name>Todd Zullinger</name>
<email>tmz@pobox.com</email>
</author>
<published>2025-03-03T20:44:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=15db9a895d36a29eac2061ec31eba5e9628b4a5b'/>
<id>urn:sha1:15db9a895d36a29eac2061ec31eba5e9628b4a5b</id>
<content type='text'>
Signed-off-by: Todd Zullinger &lt;tmz@pobox.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>global: adapt callers to use generic hash context helpers</title>
<updated>2025-01-31T18:06:11Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-01-31T12:55:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0578f1e66aa381356bfe2f53decf3864d88d23d3'/>
<id>urn:sha1:0578f1e66aa381356bfe2f53decf3864d88d23d3</id>
<content type='text'>
Adapt callers to use generic hash context helpers instead of using the
hash algorithm to update them. This makes the callsites easier to reason
about and removes the possibility that the wrong hash algorithm is used
to update the hash context's state. And as a nice side effect this also
gets rid of a bunch of users of `the_hash_algo`.

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>hash: stop typedeffing the hash context</title>
<updated>2025-01-31T18:06:10Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-01-31T12:55:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7346e340f147131ca32089f61f7d0f502f80d19d'/>
<id>urn:sha1:7346e340f147131ca32089f61f7d0f502f80d19d</id>
<content type='text'>
We generally avoid using `typedef` in the Git codebase. One exception
though is the `git_hash_ctx`, likely because it used to be a union
rather than a struct until the preceding commit refactored it. But now
that it is a normal `struct` there isn't really a need for a typedef
anymore.

Drop the typedef and adapt all callers accordingly.

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 'am/trace2-with-valueless-true'</title>
<updated>2025-01-29T22:05:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-01-29T22:05:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c5216a1bc68745ee81ba869adc6052ed892ebac1'/>
<id>urn:sha1:c5216a1bc68745ee81ba869adc6052ed892ebac1</id>
<content type='text'>
The trace2 code was not prepared to show a configuration variable
that is set to true using the valueless true syntax, which has been
corrected.

* am/trace2-with-valueless-true:
  trace2: prevent segfault on config collection with valueless true
</content>
</entry>
<entry>
<title>trace2: prevent segfault on config collection with valueless true</title>
<updated>2025-01-23T18:01:56Z</updated>
<author>
<name>Adam Murray</name>
<email>ad@canva.com</email>
</author>
<published>2025-01-10T07:28:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2fd367cf63cd5f94368340cc6fe1cd0a3fb021df'/>
<id>urn:sha1:2fd367cf63cd5f94368340cc6fe1cd0a3fb021df</id>
<content type='text'>
When TRACE2 analytics is enabled, a configuration variable set to
"valueless true" causes a segfault.

Steps to Reproduce

    GIT_TRACE2=true GIT_TRACE2_CONFIG_PARAMS=status.*
    git -c status.relativePaths version
    Expected Result
    git version 2.46.0
    Actual Result
    zsh: segmentation fault GIT_TRACE2=true

Add checks to prevent the segfault and instead show that the
variable without value.

Signed-off-by: Adam Murray &lt;ad@canva.com&gt;
Acked-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>global: mark code units that generate warnings with `-Wsign-compare`</title>
<updated>2024-12-06T11:20:02Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-12-06T10:27:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=41f43b8243f42b9df2e98be8460646d4c0100ad3'/>
<id>urn:sha1:41f43b8243f42b9df2e98be8460646d4c0100ad3</id>
<content type='text'>
Mark code units that generate warnings with `-Wsign-compare`. This
allows for a structured approach to get rid of all such warnings over
time in a way that can be easily measured.

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 'ak/typofix-2.46-maint'</title>
<updated>2024-10-04T21:21:40Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-10-04T21:21:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4861bbf85a1265c6a0e939674bb4441e748d5542'/>
<id>urn:sha1:4861bbf85a1265c6a0e939674bb4441e748d5542</id>
<content type='text'>
Typofixes.

* ak/typofix-2.46-maint:
  perl: fix a typo
  mergetool: fix a typo
  reftable: fix a typo
  trace2: fix typos
</content>
</entry>
</feed>
