Age | Commit message (Collapse) | Author |
|
This is useful when the caller already knows that the tree to look
up is valid, and thus the extra check step can be safely skipped.
|
|
|
|
|
|
|
|
Since c++17 the 'explicit' keyword has use also for constructors
with more than one argument and it is recommended to use it by
default whereever implicit conversions are not expected bahaviour.
|
|
When populating the GitTree instance stored in a Git tree-type
FileRoot with the ignore-special flag set, the GitTree instance
would be created with an empty raw_id_ field, signaling that some
of the entries might have been skipped and thus the root tree id
is not anymore in a one-to-one correspondence with the stored list
of entries.
This however caused FileRoot instances with missing tree id
information. This commit fixes the issue by always storing the
raw_id_ field as the root id of the Git tree, as well as clarifying
the relationship between this field and the ignore_special_ flag,
including refactoring the tree id getters.
|
|
Main culprits:
- std::size_t, std::nullptr_t, and NULL require <cstddef>
- std::move and std::forward require <utility>
- unordered maps and sets require respective includes
- std::for_each and std::all_of require <algorithm>
|
|
...but make sure it is still considered a special type.
The only non-special entry types remain file, executable, and tree.
|
|
|
|
... 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.
|
|
|
|
Signed-off-by: Goetz Brasche <goetz.brasche@huawei.com>
|
|
|
|
|
|
|
|
... and use it to replace the commonly used pattern in
Expression, LinkedMap, and GitTreeEntry. Furthermore, remove
assignment operators for Expression and LinkedMap as those
are considered to be used in an immutable manner anyway.
|
|
In this way, we have it available when needed, e.g., to get identifers
for file roots or to get whole trees as source artifacts.
|
|
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>
|