forked from AndreyG/libgit2cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtag.cpp
More file actions
40 lines (33 loc) · 684 Bytes
/
Copy pathtag.cpp
File metadata and controls
40 lines (33 loc) · 684 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
34
35
36
37
38
39
40
#include <git2/tag.h>
#include "git2cpp/tag.h"
#include "git2cpp/error.h"
#include "git2cpp/repo.h"
namespace git
{
Tag::Tag(git_tag * tag, Repository const & repo)
: tag_(tag)
, repo_(repo)
{}
Tag::~Tag()
{
git_tag_free(tag_);
}
Object Tag::target() const
{
git_object * obj;
git_tag_target(&obj, tag_);
return Object(obj, repo_);
}
git_otype Tag::target_type() const
{
return git_tag_target_type(tag_);
}
const char * Tag::name() const
{
return git_tag_name(tag_);
}
const char * Tag::message() const
{
return git_tag_message(tag_);
}
}