summaryrefslogtreecommitdiff
path: root/src/buffer.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Resolve remaining feedbackRussell Belfer2011-11-281-15/+13
| | | | | * replace some ints with size_ts * update NULL checks in various places
* Add two string git_buf_join and tweak input error checking.Russell Belfer2011-11-281-8/+68
| | | | | | | | 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
* Extend git_buf with new utility functions and unit tests.Russell Belfer2011-11-271-8/+136
| | | | | | | | | | | | | | 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.
* global: Properly use `git__` memory wrappersVicent Marti2011-10-281-1/+1
| | | | | Ensure that all memory related functions (malloc, calloc, strdup, free, etc) are using their respective `git__` wrappers.
* Merge pull request #405 from carlosmn/http-lsVicent Martí2011-09-221-0/+12
|\ | | | | Implement ls-remote over HTTP
| * buffer: add git_buf_consumeCarlos Martín Nieto2011-09-091-0/+7
| | | | | | | | | | | | Moves the content after 'end' to the beginning of the buffer Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
| * buffer: add git_buf_clearCarlos Martín Nieto2011-09-091-0/+5
| | | | | | | | | | | | | | Set the size to zero so the memory that has already been allocated can be reused Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | Cleanup legal dataVicent Marti2011-09-191-0/+6
|/ | | | | | | | | | 1. The license header is technically not valid if it doesn't have a copyright signature. 2. The COPYING file has been updated with the different licenses used in the project. 3. The full GPLv2 header in each file annoys me.
* odb: Direct writes are backVicent Marti2011-07-091-0/+95
DIRECT WRITES ARE BACK AND FASTER THAN EVER. The streaming writer to the ODB was an overkill for the smaller objects like Commit and Tags; most of the streaming logic was taking too long. This commit makes Commits, Tags and Trees to be built-up in memory, and then written to disk in 2 pushes (header + data), instead of streaming everything. This is *always* faster, even for big files (since the git_filebuf class still does streaming writes when the memory cache overflows). This is also a gazillion lines of code smaller, because we don't have to precompute the final size of the object before starting the stream (this was kind of defeating the point of streaming, anyway). Blobs are still written with full streaming instead of loading them in memory, since this is still the fastest way. A new `git_buf` class has been added. It's missing some features, but it'll get there.