Mutable state passed around walker configurations.
More...
#include <program_state.hpp>
|
void | add_full_commit (CR< git_oid > oid, int period) |
|
void | add_id_mapping (CR< git_oid > oid, ir::CommitId id) |
|
ir::CommitId | get_id (CR< git_oid > oid) |
|
Opt< int > | get_period (CR< git_oid > commit) const noexcept |
|
int | get_period (CR< git_oid > commit, CR< git_oid > line) const noexcept |
| get period the line was attributed to, otherwise fall back to the commit period More...
|
|
auto | consider_changed (CR< git_oid > commit_id, CR< git_oid > line_change_id) const -> bool |
|
Mutable state passed around walker configurations.
◆ add_full_commit()
void walker_state::add_full_commit |
( |
CR< git_oid > |
oid, |
|
|
int |
period |
|
) |
| |
|
inline |
Add preiod mapping of the commit to the walker. All information about line's origin period in further analysis will be based on the data provided to to this functino.
- Parameters
-
oid | git ID of the commit |
period | Period ID that this commit belongs to |
◆ add_id_mapping()
void walker_state::add_id_mapping |
( |
CR< git_oid > |
oid, |
|
|
ir::CommitId |
id |
|
) |
| |
|
inline |
◆ consider_changed()
auto walker_state::consider_changed |
( |
CR< git_oid > |
commit_id, |
|
|
CR< git_oid > |
line_change_id |
|
) |
| const -> bool |
|
inline |
Whether to consider commit referred to by
- commit_id has changed in the same period as the line (
- line_changed_id).
If line comes from an unknow commit (different branch for example) it is considered changed.
◆ get_id()
ir::CommitId walker_state::get_id |
( |
CR< git_oid > |
oid | ) |
|
|
inline |
◆ get_period() [1/2]
Opt<int> walker_state::get_period |
( |
CR< git_oid > |
commit | ) |
const |
|
inlinenoexcept |
Get period that commit is attributed to. May return 'none' option for commits that were not registered in the revese period index - ones that come from a different branch that we didn't iterate over.
◆ get_period() [2/2]
int walker_state::get_period |
( |
CR< git_oid > |
commit, |
|
|
CR< git_oid > |
line |
|
) |
| const |
|
inlinenoexcept |
get period the line was attributed to, otherwise fall back to the commit period
◆ commit_ids
std::unordered_map<git_oid, ir::CommitId> walker_state::commit_ids |
◆ config
◆ content
◆ full_commits
Vec<git_oid> walker_state::full_commits |
Ordered list of commits that were considered for the processing run.
◆ logger
SPtr<Logger> walker_state::logger |
main application logger entry
std::mutex walker_state::m |
common mutex for synchronizing content manager mutations
◆ repo
git_repository* walker_state::repo |
◆ rev_index
std::unordered_map<git_oid, int> walker_state::rev_index |
Mapping from the commit id to it's position in the whole list of considered commits
◆ rev_periods
std::unordered_map<git_oid, int> walker_state::rev_periods |
Mapping from the commits to the analysis periods they are in.
◆ sampled_commits
std::unordered_map<git_oid, ir::CommitId> walker_state::sampled_commits |
List of commits that were selected for the processing run.
◆ walker
git_revwalk* walker_state::walker |
The documentation for this struct was generated from the following file: