Updated libgit to version 2.46.2 based on Git for Windows sources
[TortoiseGit.git] / src / GitWCRev / GitWCRev.h
blob28335e7b897fa054f4afdb6ca4d82048e2b8a4cb
1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2017-2018, 2023 - TortoiseGit
4 // Copyright (C) 2003-2015 - TortoiseSVN
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software Foundation,
18 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #pragma once
21 /**
22 * \ingroup GitWCRev
23 * This structure is used as the status baton for WC crawling
24 * and contains all the information we are collecting.
26 struct GitWCRev_t
28 GitWCRev_t()
29 : HasMods(FALSE)
30 , HasUnversioned(FALSE)
31 , bIsGitItem(FALSE)
32 , bNoSubmodules(FALSE)
33 , bHasSubmodule(FALSE)
34 , bHasSubmoduleNewCommits(FALSE)
35 , bHasSubmoduleMods(FALSE)
36 , bHasSubmoduleUnversioned(FALSE)
37 , bIsTagged(FALSE)
38 , bIsUnborn(FALSE)
39 , HeadTime(0)
40 , NumCommits(0)
42 HeadHash[0] = '\0';
43 HeadHashReadable[0] = '\0';
46 static_assert(GIT_OID_MAX_SIZE == GIT_OID_SHA1_SIZE, "SHA2 is not available");
47 char HeadHash[GIT_OID_SHA1_SIZE];
48 char HeadHashReadable[GIT_OID_SHA1_HEXSIZE + 1];
49 std::string HeadAuthor;
50 std::string HeadEmail;
51 __time64_t HeadTime;
52 BOOL HasMods; // True if local modifications found
53 BOOL HasUnversioned; // True if unversioned items found
54 BOOL bIsGitItem; // True if the item is under Git version control
55 BOOL bNoSubmodules; // If TRUE if submodules should be omitted
56 BOOL bHasSubmodule; // True if working tree has submodules
57 BOOL bHasSubmoduleNewCommits; // True if HEAD of submodule does not match committed rev. in parent repo
58 BOOL bHasSubmoduleMods; // True if local modifications in an submodule found
59 BOOL bHasSubmoduleUnversioned; // True if unversioned items in submodule found
60 BOOL bIsTagged; // True if HEAD is tagged
61 BOOL bIsUnborn; // True if branch in unborn
62 size_t NumCommits; // Number of commits for the current branch
63 std::string CurrentBranch; // Name of the current branch, SHA-1 if detached head
64 std::set<std::string> ignorepatterns; // a list of file patterns to ignore