Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Kitware
GitHub Repository: Kitware/CMake
Path: blob/master/Source/CTest/cmCTestGIT.h
5000 views
1
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2
file LICENSE.rst or https://cmake.org/licensing for details. */
3
#pragma once
4
5
#include "cmConfigure.h" // IWYU pragma: keep
6
7
#include <iosfwd>
8
#include <string>
9
10
#include "cmCTestGlobalVC.h"
11
12
class cmCTest;
13
class cmMakefile;
14
15
/** \class cmCTestGIT
16
* \brief Interaction with git command-line tool
17
*
18
*/
19
class cmCTestGIT : public cmCTestGlobalVC
20
{
21
public:
22
/** Construct with a CTest instance and update log stream. */
23
cmCTestGIT(cmCTest* ctest, cmMakefile* mf, std::ostream& log);
24
25
~cmCTestGIT() override;
26
27
private:
28
unsigned int CurrentGitVersion;
29
unsigned int GetGitVersion();
30
std::string GetWorkingRevision();
31
bool NoteOldRevision() override;
32
bool NoteNewRevision() override;
33
bool UpdateImpl() override;
34
35
std::string FindGitDir();
36
std::string FindTopDir();
37
38
bool UpdateByFetchAndReset();
39
bool UpdateByCustom(std::string const& custom);
40
bool UpdateInternal();
41
42
bool LoadRevisions() override;
43
bool LoadModifications() override;
44
45
// "public" needed by older Sun compilers
46
public:
47
// Parsing helper classes.
48
class CommitParser;
49
class DiffParser;
50
class OneLineParser;
51
52
friend class CommitParser;
53
friend class DiffParser;
54
friend class OneLineParser;
55
};
56
57