Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [PATCH 4/4] unpack-trees: hide verify_uptodate()
Date: Fri, 30 Oct 2026 10:39:56 -0700	[thread overview]
Message-ID: <20261030173956.585250-5-gitster@pobox.com> (raw)
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


      parent reply	other threads:[~2026-10-30 17:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-30 17:39 [PATCH 0/4] mark symbols that are unnecessarily public static Junio C Hamano
2026-10-30 17:39 ` [PATCH 1/4] ident: remove unused author_ident_sufficiently_given() Junio C Hamano
2026-10-30 17:39 ` [PATCH 2/4] add -i: hide init/clear_add_i_state() functions Junio C Hamano
2026-10-30 17:39 ` [PATCH 3/4] read-cache: hide refresh_cache_entry() Junio C Hamano
2026-10-30 17:39 ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261030173956.585250-5-gitster@pobox.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox