- 30 Nov, 2011 5 commits
-
-
This streamlines git_buf_join and removes the join-append behavior, opting instead for a very compact join-replace of the git_buf contents. The unit tests had to be updated to remove the join-append tests and have a bunch more exhaustive tests added.
Russell Belfer committed -
Make git_buf functions always maintain a valid cstr
Vicent Martí committed -
Taking a page from core git's strbuf, this introduces git_buf_initbuf which is an empty string that is used to initialize the git_buf ptr value even for new buffers. Now the git_buf ptr will always point to a valid NUL-terminated string. This change required jumping through a few hoops for git_buf_grow and git_buf_free to distinguish between a actual allocated buffer and the global initial value. Also, this moves the allocation related functions to be next to each other near the top of buffer.c.
Russell Belfer committed -
Russell Belfer committed
-
At a tiny cost of 1 extra byte per allocation, this makes git_buf_cstr into basically a noop, which simplifies error checking when trying to convert things to use dynamic allocation. This patch also adds a new function (git_buf_copy_cstr) for copying the cstr data directly into an external buffer.
Russell Belfer committed
-
- 29 Nov, 2011 5 commits
-
-
Minor fixups
Vicent Martí committed -
Vicent Marti committed
-
Signed-off-by: schu <schu-github@schulog.org>
schu committed -
Extend git_buf with new utility functions and unit tests.
Vicent Martí committed
-
- 28 Nov, 2011 8 commits
-
-
* replace some ints with size_ts * update NULL checks in various places
Russell Belfer committed -
Carlos Martín Nieto committed
-
Vicent Marti committed
-
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
Russell Belfer committed -
Vicent Marti committed
-
Vicent Marti committed
-
- Hide the remaining transports code - Drop `git_headarray`, switch to using a callback to list refs. Makes the code cleaner.
Vicent Marti committed -
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.
Russell Belfer committed
-
- 26 Nov, 2011 11 commits
-
-
Thanks @carlosmn!
Vicent Marti committed -
Vicent Marti committed
-
Vicent Marti committed
-
Vicent Marti committed
-
Vicent Marti committed
-
There's no difference between `_free` and `_close` semantics: keep everything with the same name to avoid confusions.
Vicent Marti committed -
The ownership semantics have been changed all over the library to be consistent. There are no more "borrowed" or duplicated references. Main changes: - `git_repository_open2` and `3` have been dropped. - Added setters and getters to hotswap all the repository owned objects: `git_repository_index` `git_repository_set_index` `git_repository_odb` `git_repository_set_odb` `git_repository_config` `git_repository_set_config` `git_repository_workdir` `git_repository_set_workdir` Now working directories/index files/ODBs and so on can be hot-swapped after creating a repository and between operations. - All these objects now have proper ownership semantics with refcounting: they all require freeing after they are no longer needed (the repository always keeps its internal reference). - Repository open and initialization has been updated to keep in mind the configuration files. Bare repositories are now always detected, and a default config file is created on init. - All the tests affected by these changes have been dropped from the old test suite and ported to the new one.
Vicent Marti committed -
Don't fail when opening a new config file
Vicent Martí committed -
reference_rename() cleanup
Vicent Martí committed -
Carlos Martín Nieto committed
-
Carlos Martín Nieto committed
-
- 22 Nov, 2011 11 commits
-
-
Vicent Marti committed
-
Carlos Martín Nieto committed
-
Carlos Martín Nieto committed
-
Carlos Martín Nieto committed
-
Brandon Casey committed
-
Fix typos in the README file
Vicent Martí committed -
Never use the Qt trade mark with both letters capitalized, in the form "QT". (http://qt-project.org/trademarkpolicy.html)
Vincent Lee committed -
Vincent Lee committed
-
Vicent Marti committed
-
Networking improvements
Vicent Martí committed -
Vicent Marti committed
-