mirror of
https://git.proxmox.com/git/libgit2
synced 2025-12-07 16:12:51 +00:00
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. |
||
|---|---|---|
| .. | ||
| resources | ||
| .gitignore | ||
| NAMING | ||
| t00-core.c | ||
| t01-data.h | ||
| t01-rawobj.c | ||
| t03-data.h | ||
| t03-objwrite.c | ||
| t04-commit.c | ||
| t05-revwalk.c | ||
| t06-index.c | ||
| t07-hashtable.c | ||
| t08-tag.c | ||
| t09-tree.c | ||
| t10-refs.c | ||
| t12-repo.c | ||
| t13-threads.c | ||
| t17-bufs.c | ||
| t18-status.c | ||
| test_helpers.c | ||
| test_helpers.h | ||
| test_lib.c | ||
| test_lib.h | ||
| test_main.c | ||
| tests.supp | ||