libgit2/tests/repo
Josh Triplett 0dd98b6905 Add GIT_REPOSITORY_OPEN_FROM_ENV flag to respect $GIT_* environment vars
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.
2016-06-24 12:26:51 -07:00
..
config.c Better search path sandboxing 2014-05-15 10:56:28 -07:00
discover.c Fix repository discovery with ceiling_dirs at current directory 2016-06-24 11:44:01 -07:00
getters.c Rename tests-clar to tests 2013-11-14 14:05:52 -08:00
hashfile.c Introduce cl_assert_equal_oid 2014-07-01 14:40:16 -04:00
head.c Add tests for the annotated versions of ref-modifying functions 2015-03-16 16:57:30 +01:00
headtree.c repository: remove log message override for switching the active branch 2015-03-03 14:40:50 +01:00
init.c git_repository_init: include dotfiles when copying templates 2015-12-26 22:41:00 -06:00
message.c Fix some Windows warnings 2014-02-07 15:43:37 -08:00
new.c repository_new: test its bareness 2015-03-10 16:49:24 -04:00
open.c Add GIT_REPOSITORY_OPEN_FROM_ENV flag to respect $GIT_* environment vars 2016-06-24 12:26:51 -07:00
pathspec.c Fix compile error on Visual Studio 2014-05-27 23:36:07 +09:00
repo_helpers.c Remove the signature from ref-modifying functions 2015-03-03 14:40:50 +01:00
repo_helpers.h Rename tests-clar to tests 2013-11-14 14:05:52 -08:00
reservedname.c repo::reservedname: test a submodule update 2015-09-18 12:17:49 -04:00
setters.c config: borrow refcounted references 2015-03-03 18:35:12 +01:00
shallow.c Improve error propagation in shallow call 2014-02-18 14:05:30 -08:00
state.c repository: distinguish sequencer cherry-pick and revert 2015-11-20 13:19:23 -05:00