]> git.ipfire.org Git - thirdparty/git.git/commit
merge-tree: mark unused parameter in traverse callback
authorJeff King <peff@peff.net>
Mon, 3 Jul 2023 06:44:21 +0000 (02:44 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 14 Jul 2023 00:24:00 +0000 (17:24 -0700)
commitee550abcce86e27c0be3593a4c9af4dc7322039a
tree2d3470b51cd6468a96aa0efd6b14fb12ea9de94d
parent0b4e9013f1f23f0ee0758b2c6abfc446b1376bb0
merge-tree: mark unused parameter in traverse callback

Our threeway_callback() does not bother to look at its "n" parameter. It
is static in this file and used only by trivial_merge_trees(), which
always passes 3 trees (hence the name "threeway"). It also does not look
at "dirmask". This is OK, as it handles directories specifically by
looking at the mode bits.

Other traverse_info callbacks need these, so we can't get drop them from
the interface. But let's annotate these ones to avoid complaints from
-Wunused-parameter.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/merge-tree.c