Add a ReInit function #647

Merged
lollipopman merged 2 commits from reinit into master 2020-09-29 17:42:21 -05:00

2 Commits

Author SHA1 Message Date
Jesse Hathaway 26cf9e38ff add initLibGit2() to avoid repetition
Go does not allow you to call the package init() function, so instead
add a new function to initialize libgit2 and use that function to reduce
the repetition in ReInit()
2020-09-29 18:38:59 +00:00
Jesse Hathaway d693954cf5 Add a ReInit function
libgit2 stores the lookup paths for gitconfig files in its global state.
This means that after a program changes its effective uid libgit2 will
still look for gitconfig files in the home directory of the original
uid. Expose a way to call C.git_libgit2_init so a user can reinitialize
the libgit2 global state.
2020-09-28 20:59:18 +00:00