Ben Peart <peartben@xxxxxxxxx> writes: > Remove the static qualifier from lookup_untracked() and make it > available to other modules by exporting it from dir.h. Surely that is what you did in this patch, but leaves readers in suspense wondering why this helper needs to be available to others in the first place ;-) Let's read on. > > Signed-off-by: Ben Peart <benpeart@xxxxxxxxxxxxx> > --- > dir.c | 2 +- > dir.h | 3 +++ > 2 files changed, 4 insertions(+), 1 deletion(-) > > diff --git a/dir.c b/dir.c > index f451bfa48c..1b5558fdf9 100644 > --- a/dir.c > +++ b/dir.c > @@ -660,7 +660,7 @@ static void trim_trailing_spaces(char *buf) > * > * If "name" has the trailing slash, it'll be excluded in the search. > */ > -static struct untracked_cache_dir *lookup_untracked(struct untracked_cache *uc, > +struct untracked_cache_dir *lookup_untracked(struct untracked_cache *uc, > struct untracked_cache_dir *dir, > const char *name, int len) > { > diff --git a/dir.h b/dir.h > index bf23a470af..9e387551bd 100644 > --- a/dir.h > +++ b/dir.h > @@ -339,4 +339,7 @@ extern void connect_work_tree_and_git_dir(const char *work_tree, const char *git > extern void relocate_gitdir(const char *path, > const char *old_git_dir, > const char *new_git_dir); > +struct untracked_cache_dir *lookup_untracked(struct untracked_cache *uc, > + struct untracked_cache_dir *dir, > + const char *name, int len); > #endif