Skip to content

Commit

Permalink
strbuf: clarify API boundary
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
calvin-wan-google authored and gitster committed Jun 12, 2023
1 parent fe86abd commit 4557779
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions strbuf.h
Original file line number Diff line number Diff line change
@@ -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;

/**
Expand Down

0 comments on commit 4557779

Please sign in to comment.