Code forensics  0.1
Generate historical information about code changes
repo_processing.cpp File Reference

repository processing algorithms More...

#include "repo_processing.hpp"
#include "logging.hpp"
#include "common.hpp"
#include "git_interface.hpp"
#include "repo_graph.hpp"
#include <git2/patch.h>
#include <boost/asio/thread_pool.hpp>
#include <boost/asio/post.hpp>
#include <algorithm>
Include dependency graph for repo_processing.cpp:

Classes

struct  FullCommitData
 

Functions

int get_nesting (CR< Str > line)
 
FileId stats_via_subprocess (git_oid commit_oid, walker_state *walker, File file, CR< Str > relpath)
 
FileId stats_via_libgit (walker_state *state, git_oid commit_oid, const git_tree_entry *entry, CR< Str > relpath, File file)
 
FileId exec_walker (git_oid commit_oid, walker_state *state, CommitId commit, const char *root, const git_tree_entry *entry)
 
CommitId process_commit (git_oid commit_oid, walker_state *state)
 
void file_tasks (Vec< SubTaskParams > &treewalk, walker_state *state, git_oid commit_oid, CommitId out_commit)
 
void open_walker (git_oid &oid, walker_state &state)
 
void for_each_commit (walker_state *state)
 
void sample_blame_commits (walker_state *state, Vec< SubTaskParams > &params)
 
Vec< CommitId > launch_analysis (git_oid &oid, walker_state *state)
 

Detailed Description

repository processing algorithms

Function Documentation

◆ exec_walker()

FileId exec_walker ( git_oid  commit_oid,
walker_state state,
CommitId  commit,
const char *  root,
const git_tree_entry *  entry 
)

◆ file_tasks()

void file_tasks ( Vec< SubTaskParams > &  treewalk,
walker_state state,
git_oid  commit_oid,
CommitId  out_commit 
)

◆ for_each_commit()

void for_each_commit ( walker_state state)

◆ get_nesting()

int get_nesting ( CR< Str >  line)

◆ launch_analysis()

Vec<CommitId> launch_analysis ( git_oid &  oid,
walker_state state 
)

◆ open_walker()

void open_walker ( git_oid &  oid,
walker_state state 
)

◆ process_commit()

CommitId process_commit ( git_oid  commit_oid,
walker_state state 
)

Implementaiton of the commit processing function. Walks files that were available in the repository at the time and process each file individually, filling data into the content store.

◆ sample_blame_commits()

void sample_blame_commits ( walker_state state,
Vec< SubTaskParams > &  params 
)

◆ stats_via_libgit()

FileId stats_via_libgit ( walker_state state,
git_oid  commit_oid,
const git_tree_entry *  entry,
CR< Str >  relpath,
File  file 
)

◆ stats_via_subprocess()

FileId stats_via_subprocess ( git_oid  commit_oid,
walker_state walker,
File  file,
CR< Str >  relpath 
)

Start git blame subprocess

Read it's standard output

Proces is started in the specified project directory

For now we are only looking into the authoring time