<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/log-tree.c, branch v2.40.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.40.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.40.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2022-09-14T19:56:39Z</updated>
<entry>
<title>Merge branch 'ab/unused-annotation'</title>
<updated>2022-09-14T19:56:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-09-14T19:56:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dd407f1c7c7cce148d7313537494d0bc049ccb0e'/>
<id>urn:sha1:dd407f1c7c7cce148d7313537494d0bc049ccb0e</id>
<content type='text'>
Undoes 'jk/unused-annotation' topic and redoes it to work around
Coccinelle rules misfiring false positives in unrelated codepaths.

* ab/unused-annotation:
  git-compat-util.h: use "deprecated" for UNUSED variables
  git-compat-util.h: use "UNUSED", not "UNUSED(var)"
</content>
</entry>
<entry>
<title>Merge branch 'jk/unused-annotation'</title>
<updated>2022-09-14T19:56:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-09-14T19:56:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a6b42ec0c6e2ef492b0ed6d1f1123dc7e724154e'/>
<id>urn:sha1:a6b42ec0c6e2ef492b0ed6d1f1123dc7e724154e</id>
<content type='text'>
Annotate function parameters that are not used (but cannot be
removed for structural reasons), to prepare us to later compile
with -Wunused warning turned on.

* jk/unused-annotation:
  is_path_owned_by_current_uid(): mark "report" parameter as unused
  run-command: mark unused async callback parameters
  mark unused read_tree_recursive() callback parameters
  hashmap: mark unused callback parameters
  config: mark unused callback parameters
  streaming: mark unused virtual method parameters
  transport: mark bundle transport_options as unused
  refs: mark unused virtual method parameters
  refs: mark unused reflog callback parameters
  refs: mark unused each_ref_fn parameters
  git-compat-util: add UNUSED macro
</content>
</entry>
<entry>
<title>git-compat-util.h: use "UNUSED", not "UNUSED(var)"</title>
<updated>2022-09-01T17:49:48Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-08-25T17:09:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5cf88fd8b059235b21ee2f72b17bf1f421a9c4e7'/>
<id>urn:sha1:5cf88fd8b059235b21ee2f72b17bf1f421a9c4e7</id>
<content type='text'>
As reported in [1] the "UNUSED(var)" macro introduced in
2174b8c75de (Merge branch 'jk/unused-annotation' into next,
2022-08-24) breaks coccinelle's parsing of our sources in files where
it occurs.

Let's instead partially go with the approach suggested in [2] of
making this not take an argument. As noted in [1] "coccinelle" will
ignore such tokens in argument lists that it doesn't know about, and
it's less of a surprise to syntax highlighters.

This undoes the "help us notice when a parameter marked as unused is
actually use" part of 9b240347543 (git-compat-util: add UNUSED macro,
2022-08-19), a subsequent commit will further tweak the macro to
implement a replacement for that functionality.

1. https://lore.kernel.org/git/220825.86ilmg4mil.gmgdl@evledraar.gmail.com/
2. https://lore.kernel.org/git/220819.868rnk54ju.gmgdl@evledraar.gmail.com/

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/unused-fixes'</title>
<updated>2022-08-29T21:55:12Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-08-29T21:55:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a0ab573bb1157bee2d5567c9fc22ff96a4d8c6bb'/>
<id>urn:sha1:a0ab573bb1157bee2d5567c9fc22ff96a4d8c6bb</id>
<content type='text'>
Code clean-up to remove unused function parameters.

* jk/unused-fixes:
  xdiff: drop unused mmfile parameters from xdl_do_patience_diff()
  reflog: assert PARSE_OPT_NONEG in parse-options callbacks
  reftable: drop unused parameter from reader_seek_linear()
  verify_one_sparse(): drop unused parameters
  match_pathname(): drop unused "flags" parameter
  log-tree: drop unused commit param in remerge_diff()
  xdiff: drop unused mmfile parameters from xdl_do_histogram_diff()
</content>
</entry>
<entry>
<title>log-tree: drop unused commit param in remerge_diff()</title>
<updated>2022-08-19T19:20:43Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2022-08-19T08:50:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e2841f706ecf449c67514c253d80445b9db9a08b'/>
<id>urn:sha1:e2841f706ecf449c67514c253d80445b9db9a08b</id>
<content type='text'>
This function has never used its "commit" parameter since it was added
in db757e8b8d (show, log: provide a --remerge-diff capability,
2022-02-02).

This makes sense; we already have separate parameters for the parents
(which lets us redo the merge) and the oid of the result tree (which we
can then diff against the remerge result).

Let's drop the unused parameter in the name of clarity.

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: mark unused each_ref_fn parameters</title>
<updated>2022-08-19T19:18:54Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2022-08-19T10:08:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=63e14ee2d69b58eae72e34df81f2cde145427037'/>
<id>urn:sha1:63e14ee2d69b58eae72e34df81f2cde145427037</id>
<content type='text'>
Functions used with for_each_ref(), etc, need to conform to the
each_ref_fn interface. But most of them don't need every parameter;
let's annotate the unused ones to quiet -Wunused-parameter.

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>log-tree: use ref_namespaces instead of if/else-if</title>
<updated>2022-08-05T21:13:12Z</updated>
<author>
<name>Derrick Stolee</name>
<email>derrickstolee@github.com</email>
</author>
<published>2022-08-05T17:58:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=94d421b8afa0dc46fcd03143f10b4f3828b20104'/>
<id>urn:sha1:94d421b8afa0dc46fcd03143f10b4f3828b20104</id>
<content type='text'>
The add_ref_decoration() method uses an if/else-if chain to determine if
a ref matches a known ref namespace that has a special decoration
category. That decoration type is later used to assign a color when
writing to stdout.

The newly-added ref_namespaces array contains all namespaces, along
with information about their decoration type. Check this array instead
of this if/else-if chain. This reduces our dependency on string literals
being embedded in the decoration logic.

Signed-off-by: Derrick Stolee &lt;derrickstolee@github.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs: use ref_namespaces for replace refs base</title>
<updated>2022-08-05T21:13:12Z</updated>
<author>
<name>Derrick Stolee</name>
<email>derrickstolee@github.com</email>
</author>
<published>2022-08-05T17:58:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=97e61e0f9cd96f403504ec97cfdf38f238777560'/>
<id>urn:sha1:97e61e0f9cd96f403504ec97cfdf38f238777560</id>
<content type='text'>
The git_replace_ref_base global is used to store the value of the
GIT_REPLACE_REF_BASE environment variable or the default of
"refs/replace/". This is initialized within setup_git_env().

The ref_namespaces array is a new centralized location for information
such as the ref namespace used for replace refs. Instead of having this
namespace stored in two places, use the ref_namespaces array instead.

For simplicity, create a local git_replace_ref_base variable wherever
the global was previously used.

Signed-off-by: Derrick Stolee &lt;derrickstolee@github.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ep/maint-equals-null-cocci'</title>
<updated>2022-05-20T22:26:59Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-05-20T22:26:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=538dc459a0331c48b893c9f6ca0be5917860bb99'/>
<id>urn:sha1:538dc459a0331c48b893c9f6ca0be5917860bb99</id>
<content type='text'>
Introduce and apply coccinelle rule to discourage an explicit
comparison between a pointer and NULL, and applies the clean-up to
the maintenance track.

* ep/maint-equals-null-cocci:
  tree-wide: apply equals-null.cocci
  tree-wide: apply equals-null.cocci
  contrib/coccinnelle: add equals-null.cocci
</content>
</entry>
<entry>
<title>Merge branch 'ep/maint-equals-null-cocci' for maint-2.35</title>
<updated>2022-05-02T17:06:04Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-05-02T17:06:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2b0a58d164b0642be3eeb476fecd28114445cdd5'/>
<id>urn:sha1:2b0a58d164b0642be3eeb476fecd28114445cdd5</id>
<content type='text'>
* ep/maint-equals-null-cocci:
  tree-wide: apply equals-null.cocci
  contrib/coccinnelle: add equals-null.cocci
</content>
</entry>
</feed>
