git_repository_open_ext provides parameters for the start path, whether to search across filesystems, and what ceiling directories to stop at. git commands have standard environment variables and defaults for each of those, as well as various other parameters of the repository. To avoid duplicate environment variable handling in users of libgit2, add a GIT_REPOSITORY_OPEN_FROM_ENV flag, which makes git_repository_open_ext automatically handle the appropriate environment variables. Commands that intend to act just like those built into git itself can use this flag to get the expected default behavior. git_repository_open_ext with the GIT_REPOSITORY_OPEN_FROM_ENV flag respects $GIT_DIR, $GIT_DISCOVERY_ACROSS_FILESYSTEM, $GIT_CEILING_DIRECTORIES, $GIT_INDEX_FILE, $GIT_NAMESPACE, $GIT_OBJECT_DIRECTORY, and $GIT_ALTERNATE_OBJECT_DIRECTORIES. In the future, when libgit2 gets worktree support, git_repository_open_env will also respect $GIT_WORK_TREE and $GIT_COMMON_DIR; until then, git_repository_open_ext with this flag will error out if either $GIT_WORK_TREE or $GIT_COMMON_DIR is set.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
attr | Loading commit data... | |
blame | Loading commit data... | |
buf | Loading commit data... | |
checkout | Loading commit data... | |
cherrypick | Loading commit data... | |
clar | Loading commit data... | |
clone | Loading commit data... | |
commit | Loading commit data... | |
config | Loading commit data... | |
core | Loading commit data... | |
date | Loading commit data... | |
describe | Loading commit data... | |
diff | Loading commit data... | |
fetchhead | Loading commit data... | |
filter | Loading commit data... | |
graph | Loading commit data... | |
index | Loading commit data... | |
iterator | Loading commit data... | |
merge | Loading commit data... | |
network | Loading commit data... | |
notes | Loading commit data... | |
object | Loading commit data... | |
odb | Loading commit data... | |
online | Loading commit data... | |
pack | Loading commit data... | |
path | Loading commit data... | |
perf | Loading commit data... | |
rebase | Loading commit data... | |
refs | Loading commit data... | |
remote | Loading commit data... | |
repo | Loading commit data... | |
reset | Loading commit data... | |
resources | Loading commit data... | |
revert | Loading commit data... | |
revwalk | Loading commit data... | |
stash | Loading commit data... | |
status | Loading commit data... | |
stress | Loading commit data... | |
submodule | Loading commit data... | |
threads | Loading commit data... | |
trace | Loading commit data... | |
transport | Loading commit data... | |
win32 | Loading commit data... | |
README.md | Loading commit data... | |
clar.c | Loading commit data... | |
clar.h | Loading commit data... | |
clar_libgit2.c | Loading commit data... | |
clar_libgit2.h | Loading commit data... | |
clar_libgit2_timer.c | Loading commit data... | |
clar_libgit2_timer.h | Loading commit data... | |
clar_libgit2_trace.c | Loading commit data... | |
clar_libgit2_trace.h | Loading commit data... | |
generate.py | Loading commit data... | |
generate_crlf.sh | Loading commit data... | |
main.c | Loading commit data... | |
valgrind-supp-mac.txt | Loading commit data... |