On Mon, Feb 17, 2025 at 11:27:34PM +0800, shejialuo wrote: > diff --git a/worktree.h b/worktree.h > index 38145df80f..f7003a9c12 100644 > --- a/worktree.h > +++ b/worktree.h > @@ -30,6 +30,13 @@ struct worktree { > */ > struct worktree **get_worktrees(void); > > +/* > + * Like `get_worktrees`, but does not read HEAD. Skip reading HEAD allows to > + * get the worktree without worrying about failures pertaining to parsing > + * the HEAD ref. This is useful when we want to check the ref db consistency. Nit, not worth a reroll: this is highly specific to what you're doing. How about: "This is useful in contexts where it is assumed that the refdb may not be in a consistent state." That would also include cases like e.g. `repair_worktrees()`. Patrick