- 15 Dec, 2011 1 commit
-
-
Comes with support for global events; this fixes #496.
Vicent Marti committed
-
- 14 Dec, 2011 9 commits
-
-
It was not safe for git_buf_joinpath to be used with a pointer into the buf itself because a reallocation could invalidate the input parameter that pointed into the buffer. This patch makes it safe to self join, at least for the leading input to the join, which is the common "append" case for self joins. Also added unit tests to explicitly cover this case. This should actually fix #511
Russell Belfer committed -
This commit fixes #511.
Russell Belfer committed -
commit: add test to ensure predictability of generation of commit, tree and blob object ids
Vicent Martí committed -
Prevent segfaulting on Windows when building a temporary filename
Paul Betts committed -
nulltoken committed
-
nulltoken committed
-
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 3 commits
-
-
Thanks @carlosmn!
Vicent Marti committed -
Vicent Marti committed
-
Vicent Marti committed
-