forked from AndreyG/libgit2cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrevspec.h
More file actions
43 lines (32 loc) · 849 Bytes
/
Copy pathrevspec.h
File metadata and controls
43 lines (32 loc) · 849 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
41
42
43
#pragma once
#include "object.h"
extern "C" {
#include <git2/revparse.h>
}
namespace git
{
struct Repository;
struct Revspec
{
struct Range
{
Object from, to;
Range(git_object * single, Repository const & repo)
: from(single, repo)
{}
explicit Range(git_revspec const & revspec, Repository const & repo)
: from(revspec.from, repo)
, to(revspec.to, repo)
{}
};
Object const * single() const;
Range const * range() const;
Object * single();
unsigned int flags() const;
Revspec(git_object * single, Repository const &);
Revspec(git_revspec const &, Repository const &);
private:
unsigned int flags_ = 0;
Range revspec_;
};
}