]> git.ipfire.org Git - thirdparty/git.git/commitdiff
quote.h: bump strvec forward declaration to the top
authorJeff King <peff@peff.net>
Tue, 19 May 2026 01:19:01 +0000 (21:19 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 19 May 2026 03:14:03 +0000 (12:14 +0900)
We usually put forward declarations at the top of header files, rather
than next to the functions that need them. In theory placing it next to
the function has some explanatory value, but it's also just as likely to
become stale if other uses are added.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
quote.h

diff --git a/quote.h b/quote.h
index 0300c291041b02464e55e36a6c820a9faecf260f..400397b11a7cfc919073efd875155f6bcc576b78 100644 (file)
--- a/quote.h
+++ b/quote.h
@@ -2,6 +2,7 @@
 #define QUOTE_H
 
 struct strbuf;
+struct strvec;
 
 extern int quote_path_fully;
 
@@ -77,7 +78,6 @@ int sq_dequote_to_argv(char *arg, const char ***argv, int *nr, int *alloc);
  * still modify arg in place, but unlike sq_dequote_to_argv, the strvec
  * will duplicate and take ownership of the strings.
  */
-struct strvec;
 int sq_dequote_to_strvec(char *arg, struct strvec *);
 
 int unquote_c_style(struct strbuf *, const char *quoted, const char **endp);