]> git.99rst.org Git - git.git/commitdiff
strbuf: clarify API boundary
authorCalvin Wan <redacted>
Tue, 6 Jun 2023 19:48:37 +0000 (19:48 +0000)
committerJunio C Hamano <redacted>
Mon, 12 Jun 2023 20:49:35 +0000 (13:49 -0700)
strbuf, as a generic and widely used structure across the codebase,
should be limited as a library to only interact with primitives. Add
documentation so future functions can appropriately be placed. Older
functions that do not follow this boundary should eventually be moved or
refactored.

Signed-off-by: Calvin Wan <redacted>
Signed-off-by: Junio C Hamano <redacted>
strbuf.h

index 3dfeadb44c2e93e3e47cd448eaf8fd9133ac47bc..70778c6e105bd53d58e068a64c054ecdb1368602 100644 (file)
--- a/strbuf.h
+++ b/strbuf.h
@@ -1,6 +1,14 @@
 #ifndef STRBUF_H
 #define STRBUF_H
 
+/*
+ * NOTE FOR STRBUF DEVELOPERS
+ *
+ * strbuf is a low-level primitive; as such it should interact only
+ * with other low-level primitives. Do not introduce new functions
+ * which interact with higher-level APIs.
+ */
+
 struct string_list;
 
 /**
git clone https://git.99rst.org/PROJECT