diff options
Diffstat (limited to 'src/other_tools/just_mr/main.cpp')
-rw-r--r-- | src/other_tools/just_mr/main.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/other_tools/just_mr/main.cpp b/src/other_tools/just_mr/main.cpp index e115e7e2..f47a5993 100644 --- a/src/other_tools/just_mr/main.cpp +++ b/src/other_tools/just_mr/main.cpp @@ -1481,6 +1481,14 @@ auto main(int argc, char* argv[]) -> int { return kExitGenericFailure; } + /** + * The current implementation of libgit2 uses pthread_key_t incorrectly + * on POSIX systems to handle thread-specific data, which requires us to + * explicitly make sure the main thread is the first one to call + * git_libgit2_init. Future versions of libgit2 will hopefully fix this. + */ + GitContext::Create(); + // Run subcommands known to just and `do` if (arguments.cmd == SubCommand::kJustDo or arguments.cmd == SubCommand::kJustSubCmd) { |