Skip to content

Commit

Permalink
strbuf.h: format asciidoc code blocks as 4-space indent
Browse files Browse the repository at this point in the history
This is much easier to read when the whole thing is stuffed
inside a comment block. And there is precedent for this
convention in markdown (and just in general ascii text).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Jan 16, 2015
1 parent aa07cac commit 088c9a8
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions strbuf.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@
* NOTE: It is OK to "play" with the buffer directly if you work it this
* way:
*
* ----
* strbuf_grow(sb, SOME_SIZE); <1>
* strbuf_setlen(sb, sb->len + SOME_OTHER_SIZE);
* ----
* strbuf_grow(sb, SOME_SIZE); <1>
* strbuf_setlen(sb, sb->len + SOME_OTHER_SIZE);
*
* <1> Here, the memory array starting at `sb->buf`, and of length
* `strbuf_avail(sb)` is all yours, and you can be sure that
* `strbuf_avail(sb)` is at least `SOME_SIZE`.
Expand Down Expand Up @@ -261,9 +260,7 @@ extern void strbuf_add(struct strbuf *, const void *, size_t);
* NOTE: This function will *always* be implemented as an inline or a macro
* using strlen, meaning that this is efficient to write things like:
*
* ----
* strbuf_addstr(sb, "immediate string");
* ----
* strbuf_addstr(sb, "immediate string");
*
*/
static inline void strbuf_addstr(struct strbuf *sb, const char *s)
Expand Down

0 comments on commit 088c9a8

Please sign in to comment.