std::string url;
};
void write_log(const arguments_t& args,
const startgit::repository& repo,
const startgit::branch& branch)
{
const std::string filename = branch.get_name() + "_log.html";
std::ofstream ofs(args.output_dir / repo.get_name() / filename);
git2wrap::revwalk rwalk(repo.get());
const git2wrap::object obj = repo.get().revparse(branch.get_name().c_str());
rwalk.push(obj.get_id());
write_header(ofs,
repo.get_name(),
branch.get_name(),
repo.get_owner(),
repo.get_description());
write_title(ofs, repo, branch.get_name());
write_commit_table(ofs, rwalk);
write_footer(ofs);
}
void write_files(const arguments_t& args,
const startgit::repository& repo,
const startgit::branch& branch)
{
const std::string filename = branch.get_name() + "_files.html";
std::ofstream ofs(args.output_dir / repo.get_name() / filename);
const git2wrap::object obj = repo.get().revparse(branch.get_name().c_str());
const git2wrap::commit commit = repo.get().commit_lookup(obj.get_id());
write_header(ofs,
repo.get_name(),
branch.get_name(),
repo.get_owner(),
repo.get_description());
write_title(ofs, repo, branch.get_name());
write_files_table(ofs, commit.get_tree());
write_footer(ofs);
}
int parse_opt(int key, const char* arg, poafloc::Parser* parser)
{
auto* args = static_cast<arguments_t*>(parser->input());