object-name: move related functions to object-name

Move object-name-related functions from strbuf.[ch] to object-name.[ch]
so that strbuf is focused on string manipulation routines with minimal
dependencies.

dir.h relied on the forward declration of the repository struct in
strbuf.h. Since that is removed in this patch, add the forward
declaration to dir.h.

Signed-off-by: Calvin Wan <calvinwan@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Calvin Wan
2023-06-06 19:48:41 +00:00
committed by Junio C Hamano
parent f89854362c
commit f94018506c
6 changed files with 27 additions and 26 deletions

2
dir.h
View File

@ -40,6 +40,8 @@
*
*/
struct repository;
struct dir_entry {
unsigned int len;
char name[FLEX_ARRAY]; /* more */