git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/3] quote.h: bump strvec forward declaration to the top

From
Jeff King <peff@peff.net>
Date
May 19, 2026, 01:19 UTC
Message-ID
<20260519011901.GA1615870@coredump.intra.peff.net>
In-Reply-To
<20260519011837.GA1615637@coredump.intra.peff.net>

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>
---
 quote.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/quote.h b/quote.h
index 0300c29104..400397b11a 100644
--- 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);
-- 
2.54.0.524.g198262df96
Previous: Jeff KingNext: Jeff King
Message 2 of 6 in “small quote.[ch] cleanup”
  1. 0/3 small quote.[ch] cleanupJeff King, May 19, 2026
  2. 1/3 quote.h: bump strvec forward declaration to the topJeff King, May 19, 2026
  3. 2/3 quote: drop sq_dequote_to_argv()Jeff King, May 19, 2026
  4. 3/3 quote: simplify internals of dequotingJeff King, May 19, 2026
  5. Junio C HamanoMay 19, 2026
  6. Patrick SteinhardtMay 21, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.