From: Elijah Newren via GitGitGadget Date: Tue, 04 Apr 2023 01:22:25 GMT Subject: [PATCH v2 21/24] strbuf: move forward declarations to beginning of file Message-ID: <47afc6a6c8757032d9d69a2f9aaaeb427c5a003f.1680571352.git.gitgitgadget@gmail.com> In-Reply-To: From: Elijah Newren Signed-off-by: Elijah Newren --- strbuf.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/strbuf.h b/strbuf.h index 3dfeadb44c2..547696fb233 100644 --- a/strbuf.h +++ b/strbuf.h @@ -1,6 +1,8 @@ #ifndef STRBUF_H #define STRBUF_H +struct object_id; +struct repository; struct string_list; /** @@ -72,12 +74,6 @@ struct strbuf { extern char strbuf_slopbuf[]; #define STRBUF_INIT { .buf = strbuf_slopbuf } -/* - * Predeclare this here, since cache.h includes this file before it defines the - * struct. - */ -struct object_id; - /** * Life Cycle Functions * -------------------- @@ -634,7 +630,6 @@ void strbuf_list_free(struct strbuf **list); * Add the abbreviation, as generated by repo_find_unique_abbrev(), of `sha1` to * the strbuf `sb`. */ -struct repository; void strbuf_repo_add_unique_abbrev(struct strbuf *sb, struct repository *repo, const struct object_id *oid, int abbrev_len); void strbuf_add_unique_abbrev(struct strbuf *sb, const struct object_id *oid, -- gitgitgadget