Re: [PATCH v2 6/9] dir: change linkage of cmp_name() and check_contains()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 8, 2017, 04:37 UTC
- Message-ID
- <xmqq8tm89d6y.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20170505104611.17845-7-sxlijin@gmail.com>
Samuel Lijin <sxlijin@gmail.com> writes:
Show 11 quoted lines
> 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.