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

Re: [PATCH] unpack-trees: hide verify_uptodate()

From
Patrick Steinhardt <ps@pks.im>
Date
Oct 30, 2026, 09:31 UTC
Message-ID
<auRj7rRyg15WYiFc@pks.im>
In-Reply-To
<xmqqqzh97d2r.fsf@gitster.g>
On Wed, Oct 28, 2026 at 02:03:08PM -0700, Junio C Hamano wrote:
Show 5 quoted lines
> 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.

> external caller of this function want away.
But history checks out...
Show 26 quoted lines
> 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);
> -

... and the diff looks good. So assuming this compiles and links the change is obviously correct.

Thanks!
Patrick
Previous: Junio C Hamano
Message 2 of 2 in “unpack-trees: hide verify_uptodate()”
  1. unpack-trees: hide verify_uptodate()Junio C Hamano, Oct 28, 2026
  2. Patrick SteinhardtOct 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.