git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 4/4] unpack-trees: hide verify_uptodate()

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 30, 2026, 17:39 UTC
Message-ID
<20261030173956.585250-5-gitster@pobox.com>
In-Reply-To
<20261030173956.585250-1-gitster@pobox.com>

64b1abe962 (merge-recursive: fix overwriting dirty files involved in renames, 2018-04-19) made this function available to external callers.

With the removal of the "recursive" strategy in ad45b327c0 (merge-recursive.[ch]: thoroughly debug these, 2025-04-08), the last external caller of this function want away.

Make it file-scope static again.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 unpack-trees.c | 4 ++--
 unpack-trees.h | 3 ---
 2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/unpack-trees.c b/unpack-trees.c
index 1802809ad3..3298773490 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -2269,8 +2269,8 @@ static int verify_uptodate_1(const struct cache_entry *ce,
 	return add_rejected_path(o, error_type, ce->name);
 }
 
-int verify_uptodate(const struct cache_entry *ce,
-		    struct unpack_trees_options *o)
+static int verify_uptodate(const struct cache_entry *ce,
+			   struct unpack_trees_options *o)
 {
 	if (!o->skip_sparse_checkout &&
 	    (ce->ce_flags & CE_SKIP_WORKTREE) &&
diff --git a/unpack-trees.h b/unpack-trees.h
index 5867e26e17..638a6b076d 100644
--- a/unpack-trees.h
+++ b/unpack-trees.h
@@ -123,9 +123,6 @@ enum update_sparsity_result {
 enum update_sparsity_result update_sparsity(struct unpack_trees_options *options,
 					    struct pattern_list *pl);
 
-int verify_uptodate(const struct cache_entry *ce,
-		    struct unpack_trees_options *o);
-
 int threeway_merge(const struct cache_entry * const *stages,
 		   struct unpack_trees_options *o);
 int twoway_merge(const struct cache_entry * const *src,
-- 
2.56.0-486-gd49ba3b80a
Previous: Jeff KingNext: Jeff King
Message 7 of 8 in “mark symbols that are unnecessarily public static”
  1. 0/4 mark symbols that are unnecessarily public staticJunio C Hamano, Oct 30, 2026
  2. 1/4 ident: remove unused author_ident_sufficiently_given()Junio C Hamano, Oct 30, 2026
  3. Jeff KingOct 30, 2026
  4. 2/4 add -i: hide init/clear_add_i_state() functionsJunio C Hamano, Oct 30, 2026
  5. 3/4 read-cache: hide refresh_cache_entry()Junio C Hamano, Oct 30, 2026
  6. Jeff KingOct 30, 2026
  7. 4/4 unpack-trees: hide verify_uptodate()Junio C Hamano, Oct 30, 2026
  8. Jeff KingOct 30, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.