libgit2 does not respect GIT_CONFIG_NOSYSTEM, causing test failures
#678
mlcui-corp
started this conversation in
General
Replies: 1 comment
-
|
Thanks for investigating! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, the
command::test_move::test_move_standalone_create_gc_refsandcore::test_gc::test_gc_no_inittests fail on my machine with "Could not find repository main branch" errors.The root cause is that libgit2, used by
git-branchless, does not respect theGIT_CONFIG_NOSYSTEMused in tests. As a result,get_main_branch_namemight use the system-wideinit.defaultBranchconfig value, which on my machine ismain, notmaster:git-branchless/git-branchless-lib/src/core/config.rs
Lines 26 to 32 in 2c1a5b9
There has been some progress to fixing this upstream, see libgit2/libgit2#6399. I don't think this is too actionable by this project - system configurations could have many incompatible configs, and it's infeasible to unset all of them for tests. For example, setting
merge.conflictStyletodiff3causes test failures in thecommand::test_navigation::test_navigation_mergetest.Beta Was this translation helpful? Give feedback.
All reactions