forked from QuantStack/git2cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtag_subcommand.hpp
More file actions
33 lines (25 loc) · 782 Bytes
/
tag_subcommand.hpp
File metadata and controls
33 lines (25 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once
#include <CLI/CLI.hpp>
#include "../utils/common.hpp"
#include "../wrapper/repository_wrapper.hpp"
class tag_subcommand
{
public:
explicit tag_subcommand(const libgit2_object&, CLI::App& app);
void run();
private:
void list_tags(repository_wrapper& repo);
void delete_tag(repository_wrapper& repo);
void create_lightweight_tag(repository_wrapper& repo);
void create_tag(repository_wrapper& repo);
std::optional<object_wrapper> get_target_obj(repository_wrapper& repo);
void handle_error(int error);
std::string m_delete;
std::string m_message;
std::string m_tag_name;
std::string m_target;
bool m_list_flag = false;
bool m_force_flag = false;
bool m_annotate_flag = false;
int m_num_lines = 0;
};