Age | Commit message (Collapse) | Author |
|
...and fix inconsistent capitalisation.
|
|
Do not implicitly trust that the third-party code called in these
methods is non-throwing and instead properly handle any exception
that might arise.
|
|
This allows individual blobs read to be checked, e.g., for upwards
symlinks, also when not part of a tree, which performs such a
validation for its entries during its parsing into a GitTree.
|
|
Trying to access a git object return a recoverable failure, hence
the failure to find the object in the git object database should
be logged at warning level at most. Moreover, in some cases we
should log that event at an even lower level, e.g., if we're just
checking the presence of the object in the local git cas to avoid
unnecessary network access.
|
|
This method returns a GitCASPtr allowing the caller to handle
failure gracefully. Therefore, logging should be at most at level
Warning as it is up to the caller to provide the fatal error message.
Moreover, it can be at lower level in cases where failure to open
that git cas is not an unexpected event, e.g., when looking for a
blob in local mirrors first.
|
|
...since there are no unique_locks any more.
|
|
|
|
...and use it in GitRepo to set custom backends.
|
|
|
|
...and fix a potential memory leak in the try-catch for std::filesystem::absolute.
|
|
|
|
|
|
Some of the more specific issues addressed:
- missing log_level target/include
- header-only libs wrongly marking deps as private
- missing/misplaced gsl includes
|
|
The command 'git add .' does not include paths found in .gitignore
files in the directory tree where the command is issued. This is
not the desired behaviour, as we expect for a tree with a given
commit id to contain all of the entries, irrespective of their
meaning to Git.
This commit addresses the issue as described.
For the just-mr.py script we modified the staging command to
'git add -f .'.
For the compiled just-mr, simply adding the force flag to
'git_index_add_all' did not work as intended for files found in
ignored subdirectories. This is a known libgit2 issue which has
been fixed in v1.6.3. Until we can upgrade our libgit2 version,
a workaround was implemented: we recursively read the directory
entries ourselves and add each of them iteratively using
'git_index_add_bypath', making sure to ignore the root '.git'
subtree (which cannot be staged).
At the moment the handling of Git submodules remains an open issue,
as Git does not allow '.git' subtrees to be forcefully added to the
index, and thus such directory entries will currently not be
considered as part of a git tree. This however is consistent
behavior between Git and libgit2.
|
|
A git CAS ist just a fall back, so it is OK if it is absent (e.g.,
the specificed directory does not exist). Therefore only log at
debug level, not at error level if we cannot open it.
|
|
... and in this way, continue to work correctly in the absence
of a current working directory.
|
|
...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.
|
|
... 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.
|
|
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.
|
|
...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.
|
|
|
|
|
|
|
|
Removed unused file_system_manager dependency
|
|
|
|
|
|
Signed-off-by: Goetz Brasche <goetz.brasche@huawei.com>
|
|
|
|
|
|
|
|
|
|
Since in default (bundled) bootstrap, we bring our own version
of libgit2, also use that for the initial bootstrap step.
|
|
|
|
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>
|