Commit Graph

3 Commits

Author SHA1 Message Date
Russell Belfer
679b69c49d Resolve remaining feedback
* replace some ints with size_ts
* update NULL checks in various places
2011-11-28 13:05:25 -08:00
Russell Belfer
3aa294fd45 Add two string git_buf_join and tweak input error checking.
This commit addresses two of the comments:
* renamed existing n-input git_buf_join to git_buf_join_n
* added new git_buf_join that always takes two inputs
* moved some parameter error checking to asserts
* extended unit tests to cover new version of git_buf_join
2011-11-28 10:42:57 -08:00
Russell Belfer
8c74d22ebf Extend git_buf with new utility functions and unit tests.
Add new functions to git_buf for:
* initializing a buffer from a string
* joining one or more strings onto a buffer with separators
* swapping two buffers in place
* extracting data from a git_buf (leaving it empty)

Also, make git_buf_free leave a git_buf back in its initted state,
and slightly tweak buffer allocation sizes and thresholds.

Finally, port unit tests to clay and extend with lots of new tests
for the various git_buf functions.
2011-11-27 21:56:44 -08:00