mirror of
https://github.com/libgit2/libgit2.git
synced 2026-01-25 11:06:32 +00:00
`has_dir_name` is used to check for directory/file collisions, and attempts to determine whether the index contains a file with a directory name that is a proper subset of the new index entry that we're trying to add. To determine directory name, the function would walk the path string backwards to identify a `/`, stopping at the end of the string. However, the function assumed that the strings did not start with a `/`. If the paths contain only a single `/` at the beginning of the string, then the function would continue the loop, erroneously, when they should have stopped at the first character. Correct the order of the tests to terminate properly. Credit to Michael Rodler (@f0rki) and Amazon AWS Security.
libgit2 sources
This is the source that makes up the core of libgit2 and its related projects.
cli
A git-compatible command-line interface that uses libgit2.libgit2
This is the libgit2 project, a cross-platform, linkable library implementation of Git that you can use in your application.util
A shared utility library for these projects.