summaryrefslogtreecommitdiff
path: root/src/buildtool/file_system/git_cas.cpp
AgeCommit message (Collapse)Author
2023-05-15memcheck: fix race in libgit2...Paul Cristian Sarbu
...caused by incorrectly setting and resetting the library internal state and the misuse of pthreads in libgit2. Normally, git_libgit2_init and git_libgit2_shutdown should span the life of a worker thread in order to be safely used. However, due to an incorrect implementation of libgit2's threadstate with pthreads, on unix systems there is a race condition. Until the use of pthread_key_t is corrected in libgit2, we need to apply a workaround by always ensuring that the main thread is the first thread reaching the GitContext constructor.
2023-04-26imports: Switch to Microsoft GSL implementationOliver Reiche
... with two minor code base changes compared to previous use of gsl-lite: - dag.hpp: ActionNode::Ptr and ArtifactNode::Ptr are not wrapped in gsl::not_null<> anymore, due to lack of support for wrapping std::unique_ptr<>. More specifically, the move constructor is missing, rendering it impossible to use std::vector<>::emplace_back(). - utils/cpp/gsl.hpp: New header file added to implement the macros ExpectsAudit() and EnsureAudit(), asserts running only in debug builds, which were available in gsl-lite but are missing in MS GSL.
2023-03-30GitRepo: Guard fake repository odb wrappingPaul Cristian Sarbu
In the current libgit2 implementation, a fake repository wrapped around an existing odb is being registered as owner the same way as a normal repository object. Therefore, one has to guard both the creation and destruction of the fake repository against all other git operations that might access the internal cache during this transfer of ownership.
2023-02-17structure cleanup: move remote operations of GitRepo to other_tools...Paul Cristian Sarbu
...in order to not include unwanted dependencies in just proper. The new class extends the GitRepo class used for just's Git tree operations and gets used in all of just-mr's async maps.
2022-12-21Git: Wrap libgit2 raw pointersPaul Cristian Sarbu
2022-12-21Git CAS: Move Git tree ops to fake repo wrapper classPaul Cristian Sarbu
2022-12-20Git CAS: Add fake repository wrapper for git odbPaul Cristian Sarbu
2022-12-20Git CAS: Clean includesPaul Cristian Sarbu
Removed unused file_system_manager dependency
2022-12-20Git CAS: Add a Git context class to maintain the libgit2 statePaul Cristian Sarbu
2022-10-26GitCAS: Disable code that is unused during bootstrapOliver Reiche
2022-10-12Add copyright and license notice to all source and header filesKlaus Aehlig
Signed-off-by: Goetz Brasche <goetz.brasche@huawei.com>
2022-09-13Fix build with gcc/g++Oliver Reiche
2022-08-05GitCAS: Support reading/creating trees without filesystem IOOliver Reiche
2022-08-05GitCAS: Add create tree via libgit2's treebuilderOliver Reiche
2022-08-05GitCAS: Implement reading git tree via libgit2Oliver Reiche
2022-04-27Remove libggit2 as host bootstrap dependencyKlaus Aehlig
Since in default (bundled) bootstrap, we bring our own version of libgit2, also use that for the initial bootstrap step.
2022-03-23Apply changes suggested by clang-tidy 11Oliver Reiche
2022-02-22Initial self-hosting commitKlaus Aehlig
This is the initial version of our tool that is able to build itself. In can be bootstrapped by ./bin/bootstrap.py Co-authored-by: Oliver Reiche <oliver.reiche@huawei.com> Co-authored-by: Victor Moreno <victor.moreno1@huawei.com>