Envision
A visual programming IDE for object-oriented languages
|
Public Types | |
enum class | GitReferenceType { INVALID , NOTFOUND , BRANCH , NOTE , REMOTE , TAG } |
enum class | HEADState { UNBORN , ATTACHED , DETACHED } |
enum class | RevisionStringState { INVALID , NOTFOUND , AMBIGUOUS , VALID } |
Public Member Functions | |
GitRepository (QString path) | |
~GitRepository () | |
void | checkout (QString revision, bool force) |
CommitGraph | commitGraph (QString startRevision, QString endRevision) const |
QString | currentBranchName () const |
Diff | diff (QString revisionA, QString revisionB, std::shared_ptr< GenericTree > treeA=nullptr, std::shared_ptr< GenericTree > treeB=nullptr) const |
const Commit * | getCommit (QString revision) const |
const CommitFile * | getCommitFile (QString revision, QString relativePath) const |
CommitMetaData | getCommitInformation (QString revision) const |
HEADState | getHEADState () const |
QString | getSHA1 (QString revision) const |
bool | isValidRevisionString (QString revision) const |
void | loadGenericTree (const std::shared_ptr< GenericTree > &tree, const QString version) |
QStringList | localBranches () const |
std::shared_ptr< Merge > | merge (QString revision, bool fastForward=true) |
GitReferenceType | referenceType (QString reference) const |
QString | relativePathForPersistentUnit (QString persistentUnitId, QString revision) const |
QStringList | revisions () const |
QStringList | tags () const |
QString | workdirPath () const |
Static Public Member Functions | |
static int | getMinPrefixLength () |
static bool | repositoryExists (QString path) |
Static Public Attributes | |
static const QString | INDEX = "GitRepositoryIndex" |
static const QString | WORKDIR = "GitRepositoryWorkdir" |
Private Types | |
enum class | SourceKind { Unspecified , Commit , Index , Workdir } |
Private Member Functions | |
git_signature * | createGitSignature (Signature &signature) |
QString | currentBranch () const |
QString | findMergeBase (QString branchA, QString branchB) const |
void | findPersistentUnitDeclarations (GenericNode *node, IdToGenericNodeHash &declarations) |
const CommitFile * | getCommitFileFromIndex (QString relativePath) const |
const CommitFile * | getCommitFileFromTree (QString revision, QString relativePath) const |
const CommitFile * | getCommitFileFromWorkdir (QString relativePath) const |
git_tree * | getCommitTree (QString revision) const |
This is a wrapper around git_commit_tree(). More... | |
bool | hasCleanIndex () const |
bool | hasCleanWorkdir () const |
void | newCommit (QString tree, QString message, Signature author, Signature committer, QStringList parents) |
QString | oidToQString (const git_oid *oid) const |
git_commit * | parseCommit (QString revision) const |
QString | projectName () const |
bool | setReferenceTarget (QString reference, QString target) |
void | TraverseCommitGraph (CommitGraph *graph, git_commit *current, const git_oid *target) const |
QString | writeIndexToTree () |
void | writeRevisionIntoIndex (QString revision) |
void | writeWorkdirToIndex () |
Static Private Member Functions | |
static void | checkError (int errorCode) |
errorCode is the last error code returned from libgit2. More... | |
static QPair< SourceKind, SourceKind > | kind (QString revisionA, QString revisionB) |
static SourceKind | sourceKind (QString revision) |
Private Attributes | |
std::weak_ptr< Merge > | merge_ |
QString | path_ |
git_repository * | repository_ {} |
Static Private Attributes | |
static const char * | HEAD = "HEAD" |
static const QString | PATH_HEADS {QString{QDir::separator()} + "refs" + QDir::separator() + "heads"} |
static const QString | PATH_NOTES {QString{QDir::separator()} + "refs" + QDir::separator() + "notes"} |
static const QString | PATH_REMOTES {QString{QDir::separator()} + "refs" + QDir::separator() + "remotes"} |
static const QString | PATH_TAGS {QString{QDir::separator()} + "refs" + QDir::separator() + "tags"} |
Friends | |
class | Merge |
|
strong |
|
strong |
|
strongprivate |
FilePersistence::GitRepository::GitRepository | ( | QString | path | ) |
FilePersistence::GitRepository::~GitRepository | ( | ) |
|
staticprivate |
errorCode is the last error code returned from libgit2.
Throws an exception with a descriptive error description if errorCode indicates that an error occurred.
void FilePersistence::GitRepository::checkout | ( | QString | revision, |
bool | force | ||
) |
CommitGraph FilePersistence::GitRepository::commitGraph | ( | QString | startRevision, |
QString | endRevision | ||
) | const |
|
private |
|
private |
QString FilePersistence::GitRepository::currentBranchName | ( | ) | const |
Diff FilePersistence::GitRepository::diff | ( | QString | revisionA, |
QString | revisionB, | ||
std::shared_ptr< GenericTree > | treeA = nullptr , |
||
std::shared_ptr< GenericTree > | treeB = nullptr |
||
) | const |
|
private |
|
private |
const Commit * FilePersistence::GitRepository::getCommit | ( | QString | revision | ) | const |
const CommitFile * FilePersistence::GitRepository::getCommitFile | ( | QString | revision, |
QString | relativePath | ||
) | const |
|
private |
|
private |
|
private |
CommitMetaData FilePersistence::GitRepository::getCommitInformation | ( | QString | revision | ) | const |
|
private |
This is a wrapper around git_commit_tree().
Returns the git_tree at revision.
GitRepository::HEADState FilePersistence::GitRepository::getHEADState | ( | ) | const |
|
static |
QString FilePersistence::GitRepository::getSHA1 | ( | QString | revision | ) | const |
|
private |
|
private |
bool FilePersistence::GitRepository::isValidRevisionString | ( | QString | revision | ) | const |
|
staticprivate |
void FilePersistence::GitRepository::loadGenericTree | ( | const std::shared_ptr< GenericTree > & | tree, |
const QString | version | ||
) |
QStringList FilePersistence::GitRepository::localBranches | ( | ) | const |
std::shared_ptr< Merge > FilePersistence::GitRepository::merge | ( | QString | revision, |
bool | fastForward = true |
||
) |
|
private |
|
private |
|
private |
|
inlineprivate |
GitRepository::GitReferenceType FilePersistence::GitRepository::referenceType | ( | QString | reference | ) | const |
QString FilePersistence::GitRepository::relativePathForPersistentUnit | ( | QString | persistentUnitId, |
QString | revision | ||
) | const |
|
static |
QStringList FilePersistence::GitRepository::revisions | ( | ) | const |
|
private |
|
staticprivate |
QStringList FilePersistence::GitRepository::tags | ( | ) | const |
|
private |
|
inline |
|
private |
|
private |
|
private |
|
friend |
|
staticprivate |
|
static |
|
private |
|
private |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
private |
|
static |