summaryrefslogtreecommitdiff
path: root/src/buildtool/file_system/git_tree.cpp
AgeCommit message (Collapse)Author
2025-06-04GitTree: Allow tree reading to skip symlinks checkerPaul Cristian Sarbu
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.
2025-06-04GitTree: Ensure all read entries are validPaul Cristian Sarbu
Match behaviour of reading trees, which always checks for invalid entries, also for reading blobs.
2025-06-04git_cas: Be explicit in hash type (raw or hex) when readingPaul Cristian Sarbu
2024-11-14file_system: Implement IWYU suggestionsPaul Cristian Sarbu
2024-10-07Disable misc-no-recursion checkMaksim Denisov
...since we use recursion for trees a lot, but skip this check manually.
2024-08-30Replace bazel_re::Digest in GitRepo::SymlinksCheckFunc callbackMaksim Denisov
...with ArtifactDigest.
2024-08-30Unify symlink checks in git treeMaksim Denisov
2024-05-17FileRoot: Fix parsing of ignore-special Git tree rootsPaul Cristian Sarbu
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.
2024-03-15Clean up more includes and targetsPaul Cristian Sarbu
Some of the more specific issues addressed: - missing log_level target/include - header-only libs wrongly marking deps as private - missing/misplaced gsl includes
2023-06-26ReadTree: Add check for non-upwards symlinks...Paul Cristian Sarbu
...as early as possible. This ensures that callers always receive only the tree entries for the supported object types. For the symlinks non-upwardness check we pass a lambda capturing the real backend of the tree entries, such that the symlinks can be read. Updates git_tree tests accordingly.
2023-05-31FileRoot: Add ignore-special roots logicPaul Cristian Sarbu
2023-05-05GitTree: Check optional before accessing itOliver Reiche
... and drop unecessary IsTree() check.
2023-03-31git tree: degrade log level for missing entry in a git tree to debugKlaus Aehlig
... as this is only an internal functionality, and the caller will take care of a proper error message if the absence of that entry is not expected.
2022-12-21Git CAS: Move Git tree ops to fake repo wrapper classPaul Cristian Sarbu
2022-10-12Add copyright and license notice to all source and header filesKlaus Aehlig
Signed-off-by: Goetz Brasche <goetz.brasche@huawei.com>
2022-08-05Git tree can return its raw string dataSascha Roloff
2022-08-05Git tree can return sizeSascha Roloff
2022-08-05GitCAS: Implement reading git tree via libgit2Oliver Reiche
2022-06-13multithreading: Add AtomicValue to atomically set/get valueOliver Reiche
... 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.
2022-06-13Include raw identifier to GitTreeKlaus Aehlig
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.
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>