- 14 Dec, 2011 3 commits
-
-
Conflicts: tests-clay/clay.h tests-clay/clay_main.c
Vicent Marti committed -
Vicent Marti committed
-
Vicent Marti committed
-
- 09 Dec, 2011 1 commit
-
-
Conflicts: tests-clay/clay_main.c
Vicent Marti committed
-
- 08 Dec, 2011 1 commit
-
-
This converts virtually all of the places that allocate GIT_PATH_MAX buffers on the stack for manipulating paths to use git_buf objects instead. The patch is pretty careful not to touch the public API for libgit2, so there are a few places that still use GIT_PATH_MAX. This extends and changes some details of the git_buf implementation to add a couple of extra functions and to make error handling easier. This includes serious alterations to all the path.c functions, and several of the fileops.c ones, too. Also, there are a number of new functions that parallel existing ones except that use a git_buf instead of a stack-based buffer (such as git_config_find_global_r that exists alongsize git_config_find_global). This also modifies the win32 version of p_realpath to allocate whatever buffer size is needed to accommodate the realpath instead of hardcoding a GIT_PATH_MAX limit, but that change needs to be tested still.
Russell Belfer committed
-
- 04 Dec, 2011 1 commit
-
-
nulltoken committed
-
- 03 Dec, 2011 3 commits
-
-
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk> Signed-off-by: Vicent Marti <tanoku@gmail.com> # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # Author: Carlos Martín Nieto <carlos@cmartin.tk> # # On branch development # Your branch is ahead of 'origin/development' by 11 commits. # # Changes to be committed: # (use "git reset HEAD^1 <file>..." to unstage) # # modified: include/git2/tree.h # modified: src/tree.c # modified: tests-clay/clay_main.c # modified: tests-clay/object/tree/diff.c # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # 0001-remote-Cleanup-the-remotes-code.patch # 466.patch # 466.patch.1 # 488.patch # Makefile # libgit2.0.15.0.dylib # libgit2.0.dylib # libgit2.dylib # libgit2_clay # libgit2_test # tests-clay/object/tree/
Vicent Marti committed -
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk> Signed-off-by: Vicent Marti <tanoku@gmail.com>
Carlos Martín Nieto committed -
For each difference in the trees, the callback gets called with the relevant information so the user can fill in their own data structures. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto committed
-
- 01 Dec, 2011 2 commits
-
-
Fix compilation warnings
Vicent Martí committed -
nulltoken committed
-
- 30 Nov, 2011 6 commits
-
-
Optimized implementation of git_buf_join
Vicent Martí committed -
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 10 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
-