unpack-trees: hide verify_uptodate()
PATCH 1/1 unpack-trees: hide verify_uptodate()
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.
--- unpack-trees.c | 4 ++-- unpack-trees.h | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-)
unpack-trees.c +2 -2
@@ -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) &&
unpack-trees.h +0 -3
@@ -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,
Signature · 1 line
2.56.0-433-ga9209adf11
Quoted 5 lines · Junio C Hamano
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
Heh, this commit message confused me for a second, until I remembered the discussion that we had around it back then.
Quoted 1 line
external caller of this function want away.
But history checks out...
Quoted 20 lines
unpack-trees.c +2
-2@@ -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) &&unpack-trees.h +0
-0
unpack-trees.h enum update_sparsity_result { · line 128
Quoted 6 lines
unpack-trees.h +0
-3@@ -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); -
... and the diff looks good. So assuming this compiles and links the change is obviously correct.
Thanks!
Patrick