Grindstone Game Engine
v0.2.0
An open source game engine and toolkit.
Toggle main menu visibility
Loading...
Searching...
No Matches
GitManager.hpp
1
#pragma once
2
3
#include <filesystem>
4
#include <string>
5
6
namespace
Grindstone {
7
namespace
Editor {
8
enum class
GitRepoStatus {
9
NeedCheck = 0,
10
NoRepo,
11
RepoInitializedButUnfetched,
12
RepoFetched
13
};
14
15
class
GitManager
{
16
public
:
17
void
Initialize();
18
void
UpdateGitPeriodically();
19
void
Fetch();
20
void
Pull();
21
void
Push();
22
bool
OpenRepository();
23
void
CloseRepository();
24
25
GitRepoStatus GetGitRepoStatus()
const
;
26
const
std::string& GetBranchName()
const
;
27
uint32_t GetBehindCount()
const
;
28
uint32_t GetAheadCount()
const
;
29
uint32_t GetChangesCount()
const
;
30
private
:
31
void
UpdateGit();
32
void
UpdateBranchName();
33
34
struct
git_repository* repo =
nullptr
;
35
36
GitRepoStatus repoStatus = GitRepoStatus::NeedCheck;
37
std::string currentBranchName;
38
uint32_t behindCount = 0;
39
uint32_t aheadCount = 0;
40
uint32_t changesCount = 0;
41
};
42
}
43
}
Grindstone::Editor::GitManager
Definition
GitManager.hpp:15
sources
code
Editor
GitManager.hpp
Generated by
1.17.0