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.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
resources | Loading commit data... | |
.gitignore | Loading commit data... | |
NAMING | Loading commit data... | |
t00-core.c | Loading commit data... | |
t01-data.h | Loading commit data... | |
t01-rawobj.c | Loading commit data... | |
t03-data.h | Loading commit data... | |
t03-objwrite.c | Loading commit data... | |
t04-commit.c | Loading commit data... | |
t05-revwalk.c | Loading commit data... | |
t06-index.c | Loading commit data... | |
t07-hashtable.c | Loading commit data... | |
t08-tag.c | Loading commit data... | |
t09-tree.c | Loading commit data... | |
t10-refs.c | Loading commit data... | |
t12-repo.c | Loading commit data... | |
t13-threads.c | Loading commit data... | |
t17-bufs.c | Loading commit data... | |
t18-status.c | Loading commit data... | |
test_helpers.c | Loading commit data... | |
test_helpers.h | Loading commit data... | |
test_lib.c | Loading commit data... | |
test_lib.h | Loading commit data... | |
test_main.c | Loading commit data... | |
tests.supp | Loading commit data... |