From: Junio C Hamano Date: Mon, 08 May 2017 04:37:09 GMT Subject: Re: [PATCH v2 6/9] dir: change linkage of cmp_name() and check_contains() Message-ID: In-Reply-To: <20170505104611.17845-7-sxlijin@gmail.com> Samuel Lijin writes: > diff --git a/dir.h b/dir.h > index bf23a470a..1ddd8b611 100644 > --- a/dir.h > +++ b/dir.h > @@ -326,6 +326,9 @@ static inline int dir_path_match(const struct dir_entry *ent, > has_trailing_dir); > } > > +int cmp_name(const void *p1, const void *p2); > +int check_contains(const struct dir_entry *out, const struct dir_entry *in); > + Both of these would have been perfectly sensible names when they were private to dir.c, but are way too generic to live in the global namespace. When a person who works on Git internal hears a name "check_contains()", I am sure that the first guess of what the function does is to see if a commit is a descendant of another commit.