Fixed issue #2495: "Show Reflog" dialog shows empty action for "push" entries
[TortoiseGit.git] / src / TortoiseProc / GitDiff.h
blobbfc045a2b077d333879d2255babfd263e9e686bd
1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2008-2014 - TortoiseGit
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software Foundation,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #pragma once
21 #include "TGitPath.h"
22 #include "GitStatus.h"
23 #include "Git.h"
25 class CGitDiff
27 public:
28 CGitDiff(void);
29 ~CGitDiff(void);
31 // if you change something here, also update SubmoduleDiffDlg.cpp and SubmoduleResolveConflictDlg.cpp!
32 enum ChangeType
34 Unknown,
35 Identical,
36 NewSubmodule,
37 DeleteSubmodule,
38 FastForward,
39 Rewind,
40 NewerTime,
41 OlderTime,
42 SameTime
44 static void GetSubmoduleChangeType(CGit& subgit, const CString& oldhash, const CString& newhash, bool& oldOK, bool& newOK, ChangeType& changeType, CString& oldsub, CString& newsub);
46 // Use two path to handle rename cases
47 static int Diff(const CTGitPath * pPath1, const CTGitPath *pPath2, git_revnum_t rev1, git_revnum_t rev2, bool blame = false, bool unified = false, int jumpToLine = 0);
48 static int SubmoduleDiff(const CTGitPath * pPath1, const CTGitPath *pPath2, const git_revnum_t &rev1, const git_revnum_t &rev2, bool blame = false, bool unified = false);
49 static int DiffNull(const CTGitPath *pPath, git_revnum_t rev1, bool bIsAdd = true, int jumpToLine = 0);
50 static int DiffCommit(const CTGitPath &path, const GitRev *r1, const GitRev *r2);
51 static int DiffCommit(const CTGitPath &path1, const CTGitPath &path2, const GitRev *r1, const GitRev *r2);
52 static int DiffCommit(const CTGitPath &path, const CString &r1, const CString &r2);
53 static int DiffCommit(const CTGitPath &path1, const CTGitPath &path2, const CString &r1, const CString &r2);
54 static int SubmoduleDiffNull(const CTGitPath * pPath1, const git_revnum_t &rev1);