aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/git/gitsettings.h
blob: f6ec650c2e8f8037606c9a398793c234bc87a592 (plain)
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
44
45
46
47
48
49
50
51
52
53
54
55
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#pragma once

#include <vcsbase/vcsbaseclientsettings.h>

namespace Git::Internal {

enum CommitType
{
    SimpleCommit,
    AmendCommit,
    FixupCommit
};

// Todo: Add user name and password?
class GitSettings final : public VcsBase::VcsBaseSettings
{
public:
    GitSettings();

    Utils::BoolAspect pullRebase{this};
    Utils::BoolAspect showTags{this};
    Utils::BoolAspect omitAnnotationDate{this};
    Utils::BoolAspect ignoreSpaceChangesInDiff{this};
    Utils::BoolAspect ignoreSpaceChangesInBlame{this};
    Utils::IntegerAspect blameMoveDetection{this};
    Utils::BoolAspect diffPatience{this};
    Utils::BoolAspect winSetHomeEnvironment{this};
    Utils::StringAspect gitkOptions{this};
    Utils::BoolAspect logDiff{this};
    Utils::FilePathAspect repositoryBrowserCmd{this};
    Utils::BoolAspect graphLog{this};
    Utils::BoolAspect colorLog{this};
    Utils::BoolAspect firstParent{this};
    Utils::BoolAspect followRenames{this};
    Utils::IntegerAspect lastResetIndex{this};
    Utils::BoolAspect refLogShowDate{this};
    Utils::BoolAspect instantBlame{this};
    Utils::BoolAspect instantBlameIgnoreSpaceChanges{this};
    Utils::BoolAspect instantBlameIgnoreLineMoves{this};

    mutable Utils::FilePath resolvedBinPath;
    mutable bool tryResolve = true;

    Utils::FilePath gitExecutable(bool *ok = nullptr, QString *errorMessage = nullptr) const;

    static QString trIgnoreWhitespaceChanges();
    static QString trIgnoreLineMoves();
};

GitSettings &settings();

} // Git::Internal