summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-03-05 06:16:30 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-03-05 06:16:30 (GMT)
commit26f1e9bd68b6eb32d1376ae392354551c5ae17bc (patch)
tree95022cd5fef1afa3c575f1961156d18d6d090cd1 /Documentation
parentb2c8c6d944722f9a4f27370f4e89d13f61243302 (diff)
parent8a557bb77fc009b00f7952f0d3d6ebd33079f70e (diff)
downloadgit-26f1e9bd68b6eb32d1376ae392354551c5ae17bc.zip
git-26f1e9bd68b6eb32d1376ae392354551c5ae17bc.tar.gz
git-26f1e9bd68b6eb32d1376ae392354551c5ae17bc.tar.bz2
Merge branch 'tr/maint-bundle-long-subject' into maint
* tr/maint-bundle-long-subject: t5704: match tests to modern style strbuf: improve strbuf_get*line documentation bundle: use a strbuf to scan the log for boundary commits bundle: put strbuf_readline_fd in strbuf.c with adjustments
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/technical/api-strbuf.txt18
1 files changed, 17 insertions, 1 deletions
diff --git a/Documentation/technical/api-strbuf.txt b/Documentation/technical/api-strbuf.txt
index afe2759..95a8bf3 100644
--- a/Documentation/technical/api-strbuf.txt
+++ b/Documentation/technical/api-strbuf.txt
@@ -255,8 +255,24 @@ same behaviour as well.
`strbuf_getline`::
- Read a line from a FILE* pointer. The second argument specifies the line
+ Read a line from a FILE *, overwriting the existing contents
+ of the strbuf. The second argument specifies the line
terminator character, typically `'\n'`.
+ Reading stops after the terminator or at EOF. The terminator
+ is removed from the buffer before returning. Returns 0 unless
+ there was nothing left before EOF, in which case it returns `EOF`.
+
+`strbuf_getwholeline`::
+
+ Like `strbuf_getline`, but keeps the trailing terminator (if
+ any) in the buffer.
+
+`strbuf_getwholeline_fd`::
+
+ Like `strbuf_getwholeline`, but operates on a file descriptor.
+ It reads one character at a time, so it is very slow. Do not
+ use it unless you need the correct position in the file
+ descriptor.
`stripspace`::