|
Guitar
|
#include <Git.h>
Classes | |
| struct | RemoteInfo |
Public Types | |
| using | ReflogItemList = QList< GitReflogItem > |
Public Member Functions | |
| Git (GitContext const &cx, QString const &repodir, QString const &submodpath, QString const &sshkey) | |
| Git (Git &&r)=delete | |
| ~Git ()=default | |
| void | clearCommandCache () |
| void | clearObjectCache () |
| AbstractGitSession::Info & | gitinfo () |
| AbstractGitSession::Info const & | gitinfo () const |
| QByteArray | toQByteArray (const std::optional< GitResult > &var) const |
| bool | isValidGitCommand () const |
| std::string | resultStdString (const std::optional< GitResult > &var) const |
| QString | resultQString (const std::optional< GitResult > &var) const |
| std::optional< GitResult > | exec_git (QString const &arg, AbstractGitSession::Option const &opt) |
| std::optional< GitResult > | git (QString const &arg) |
| std::optional< GitResult > | git_nolog (QString const &arg, AbstractPtyProcess *pty) |
| std::optional< GitResult > | git_nochdir (QString const &arg, AbstractPtyProcess *pty) |
| bool | remove (QString const &path) |
| void | setWorkingRepositoryDir (QString const &repo, const QString &sshkey) |
| void | setSubmodulePath (const QString &submodpath) |
| QString | workingDir () const |
| QString const & | sshKey () const |
| void | setSshKey (const QString &sshkey) |
| QString | getCurrentBranchName () |
| bool | isValidWorkingCopy () const |
| QString | version () |
| bool | init () |
| QStringList | getUntrackedFiles () |
| GitCommitItemList | log_all (GitHash const &id, int maxcount) |
| コミットログを取得する More... | |
| GitCommitItemList | log_file (QString const &path, int maxcount) |
| std::vector< GitHash > | rev_list_all (GitHash const &id, int maxcount) |
| std::optional< GitCommitItem > | log_signature (GitHash const &id) |
| Git::log_signature. More... | |
| GitCommitItemList | log (int maxcount) |
| std::optional< GitCommitItem > | queryCommitItem (const GitHash &id) |
| bool | clone (GitCloneData const &data, AbstractPtyProcess *pty) |
| std::vector< GitFileStatus > | status_s () |
| std::optional< QByteArray > | cat_file (GitHash const &id) |
| void | resetFile (QString const &path) |
| void | resetAllFiles () |
| void | rm (QString const &path, bool rm_real_file) |
| void | add_A () |
| bool | unstage_all () |
| void | stage (QString const &path) |
| bool | stage (QStringList const &paths, AbstractPtyProcess *pty) |
| void | unstage (QString const &path) |
| void | unstage (QStringList const &paths) |
| bool | pull (AbstractPtyProcess *pty=nullptr) |
| bool | fetch (AbstractPtyProcess *pty=nullptr, bool prune=false) |
| QList< GitBranch > | branches () |
| QString | diff (QString const &old_id, QString const &new_id) |
| QString | diff_file (QString const &old_path, QString const &new_path) |
| std::vector< std::string > | diff_name_only_head () |
| std::string | diff_full_index_head_file (const QString &file) |
| QList< GitDiffRaw > | diff_raw (GitHash const &old_id, GitHash const &new_id) |
| QString | status () |
| bool | commit (QString const &text, bool sign, AbstractPtyProcess *pty) |
| bool | commit_amend_m (QString const &text, bool sign, AbstractPtyProcess *pty) |
| bool | revert (const GitHash &id) |
| bool | push_tags (AbstractPtyProcess *pty=nullptr) |
| void | remote_v (std::vector< GitRemote > *out) |
| void | createBranch (QString const &name) |
| void | checkoutBranch (QString const &name) |
| void | mergeBranch (QString const &name, GitMergeFastForward ff, bool squash) |
| bool | deleteBranch (QString const &name) |
| bool | checkout (QString const &branch_name, QString const &id={}) |
| bool | checkout_detach (QString const &id) |
| void | rebaseBranch (QString const &name) |
| void | rebase_abort () |
| bool | isValidWorkingCopy (QString const &dir) const |
| QString | diff_to_file (QString const &old_id, QString const &path) |
| QString | errorMessage (const std::optional< GitResult > &var) const |
| GitHash | rev_parse (QString const &name) |
| QList< GitTag > | tags () |
| bool | tag (QString const &name, GitHash const &id={}) |
| bool | delete_tag (QString const &name, bool remote) |
| void | setRemoteURL (const GitRemote &remote) |
| void | addRemoteURL (const GitRemote &remote) |
| void | removeRemote (QString const &name) |
| QStringList | getRemotes () |
| GitUser | getUser (GitSource purpose) |
| void | setUser (GitUser const &user, bool global) |
| bool | reset_head1 () |
| bool | reset_hard () |
| bool | clean_df () |
| bool | push_u (bool set_upstream, QString const &remote, QString const &branch, bool force, AbstractPtyProcess *pty) |
| QString | objectType (const GitHash &id) |
| bool | rm_cached (QString const &file) |
| void | cherrypick (QString const &name) |
| QString | getCherryPicking () const |
| QString | getMessage (const QString &id) |
| bool | reflog (ReflogItemList *out, int maxcount=100) |
| QByteArray | blame (QString const &path) |
| QString | signingKey (GitSource purpose) |
| bool | setSigningKey (QString const &id, bool global) |
| GitSignPolicy | signPolicy (GitSource source) |
| bool | setSignPolicy (GitSource source, GitSignPolicy policy) |
| bool | configGpgProgram (QString const &path, bool global) |
| QList< RemoteInfo > | ls_remote () |
| bool | stash () |
| bool | stash_apply () |
| bool | stash_drop () |
| QList< GitSubmoduleItem > | submodules () |
| bool | submodule_add (const GitCloneData &data, bool force, AbstractPtyProcess *pty) |
| bool | submodule_update (const GitSubmoduleUpdateData &data, AbstractPtyProcess *pty) |
| QString | queryEntireCommitMessage (const GitHash &id) |
| QString | getDefaultBranch () |
| void | setDefaultBranch (QString const &branchname) |
| void | unsetDefaultBranch () |
| QDateTime | repositoryLastModifiedTime () |
| std::optional< std::vector< GitFileItem > > | ls (const QString &path) |
| std::optional< std::vector< char > > | readfile (const QString &path) |
Static Public Member Functions | |
| static GitSignatureGrade | evaluateSignature (char c) |
| static bool | isUncommited (GitCommitItem const &item) |
| static GitCloneData | preclone (QString const &url, QString const &path) |
| static std::optional< GitCommitItem > | parseCommit (QByteArray const &ba) |
Private Member Functions | |
| QStringList | make_branch_list_ (const std::optional< GitResult > &result) |
| std::vector< GitFileStatus > | status_s_ () |
| bool | commit_ (QString const &msg, bool amend, bool sign, AbstractPtyProcess *pty) |
| Git () | |
| void | _init (const GitContext &cx) |
| QString | encodeQuotedText (QString const &str) |
Static Private Member Functions | |
| static void | parseAheadBehind (QString const &s, GitBranch *b) |
| static std::optional< GitCommitItem > | parseCommitItem (const QString &line) |
Private Attributes | |
| std::shared_ptr< AbstractGitSession > | session_ |
Friends | |
| class | GitRunner |
| using Git::ReflogItemList = QList<GitReflogItem> |
|
private |
| Git::Git | ( | GitContext const & | cx, |
| QString const & | repodir, | ||
| QString const & | submodpath, | ||
| QString const & | sshkey | ||
| ) |

|
delete |
|
default |
|
private |

| void Git::add_A | ( | ) |

| void Git::addRemoteURL | ( | const GitRemote & | remote | ) |

| QByteArray Git::blame | ( | QString const & | path | ) |

| QList< GitBranch > Git::branches | ( | ) |

| std::optional< QByteArray > Git::cat_file | ( | GitHash const & | id | ) |

| bool Git::checkout | ( | QString const & | branch_name, |
| QString const & | id = {} |
||
| ) |

| bool Git::checkout_detach | ( | QString const & | id | ) |

| void Git::checkoutBranch | ( | QString const & | name | ) |

| void Git::cherrypick | ( | QString const & | name | ) |

| bool Git::clean_df | ( | ) |

| void Git::clearCommandCache | ( | ) |
| void Git::clearObjectCache | ( | ) |
| bool Git::clone | ( | GitCloneData const & | data, |
| AbstractPtyProcess * | pty | ||
| ) |

| bool Git::commit | ( | QString const & | text, |
| bool | sign, | ||
| AbstractPtyProcess * | pty | ||
| ) |

|
private |

| bool Git::commit_amend_m | ( | QString const & | text, |
| bool | sign, | ||
| AbstractPtyProcess * | pty | ||
| ) |

| bool Git::configGpgProgram | ( | QString const & | path, |
| bool | global | ||
| ) |

| void Git::createBranch | ( | QString const & | name | ) |

| bool Git::delete_tag | ( | QString const & | name, |
| bool | remote | ||
| ) |

| bool Git::deleteBranch | ( | QString const & | name | ) |

| QString Git::diff | ( | QString const & | old_id, |
| QString const & | new_id | ||
| ) |

| QString Git::diff_file | ( | QString const & | old_path, |
| QString const & | new_path | ||
| ) |

| std::string Git::diff_full_index_head_file | ( | const QString & | file | ) |

| std::vector< std::string > Git::diff_name_only_head | ( | ) |

| QList< GitDiffRaw > Git::diff_raw | ( | GitHash const & | old_id, |
| GitHash const & | new_id | ||
| ) |

| QString Git::diff_to_file | ( | QString const & | old_id, |
| QString const & | path | ||
| ) |

|
private |
| QString Git::errorMessage | ( | const std::optional< GitResult > & | var | ) | const |

|
inlinestatic |
|
inline |
| bool Git::fetch | ( | AbstractPtyProcess * | pty = nullptr, |
| bool | prune = false |
||
| ) |

| QString Git::getCherryPicking | ( | ) | const |

| QString Git::getCurrentBranchName | ( | ) |

| QString Git::getDefaultBranch | ( | ) |

| QString Git::getMessage | ( | const QString & | id | ) |

| QStringList Git::getRemotes | ( | ) |

| QStringList Git::getUntrackedFiles | ( | ) |

|
inline |

|
inline |

|
inline |

|
inline |
|
inline |
| bool Git::init | ( | ) |

|
inlinestatic |

|
inline |
| bool Git::isValidWorkingCopy | ( | ) | const |

| bool Git::isValidWorkingCopy | ( | QString const & | dir | ) | const |
| GitCommitItemList Git::log | ( | int | maxcount | ) |

| GitCommitItemList Git::log_all | ( | GitHash const & | id, |
| int | maxcount | ||
| ) |
コミットログを取得する
| id | コミットID |
| maxcount | 最大アイテム数 |

| GitCommitItemList Git::log_file | ( | QString const & | path, |
| int | maxcount | ||
| ) |

| std::optional< GitCommitItem > Git::log_signature | ( | GitHash const & | id | ) |
| id | コミットID |
コミットに関連する署名情報を取得する

| std::optional< std::vector< GitFileItem > > Git::ls | ( | const QString & | path | ) |
| QList< Git::RemoteInfo > Git::ls_remote | ( | ) |

|
private |

| void Git::mergeBranch | ( | QString const & | name, |
| GitMergeFastForward | ff, | ||
| bool | squash | ||
| ) |

| QString Git::objectType | ( | const GitHash & | id | ) |

|
staticprivate |
|
static |

|
staticprivate |

|
static |
| bool Git::pull | ( | AbstractPtyProcess * | pty = nullptr | ) |

| bool Git::push_tags | ( | AbstractPtyProcess * | pty = nullptr | ) |

| bool Git::push_u | ( | bool | set_upstream, |
| QString const & | remote, | ||
| QString const & | branch, | ||
| bool | force, | ||
| AbstractPtyProcess * | pty | ||
| ) |

| std::optional< GitCommitItem > Git::queryCommitItem | ( | const GitHash & | id | ) |

| QString Git::queryEntireCommitMessage | ( | const GitHash & | id | ) |

| std::optional< std::vector< char > > Git::readfile | ( | const QString & | path | ) |
| void Git::rebase_abort | ( | ) |

| void Git::rebaseBranch | ( | QString const & | name | ) |

| bool Git::reflog | ( | ReflogItemList * | out, |
| int | maxcount = 100 |
||
| ) |

| void Git::remote_v | ( | std::vector< GitRemote > * | out | ) |

|
inline |
| void Git::removeRemote | ( | QString const & | name | ) |

| QDateTime Git::repositoryLastModifiedTime | ( | ) |

| bool Git::reset_hard | ( | ) |

| bool Git::reset_head1 | ( | ) |

| void Git::resetAllFiles | ( | ) |

| void Git::resetFile | ( | QString const & | path | ) |

| QString Git::resultQString | ( | const std::optional< GitResult > & | var | ) | const |

| std::string Git::resultStdString | ( | const std::optional< GitResult > & | var | ) | const |


| GitHash Git::rev_parse | ( | QString const & | name | ) |

| bool Git::revert | ( | const GitHash & | id | ) |

| void Git::rm | ( | QString const & | path, |
| bool | rm_real_file | ||
| ) |

| bool Git::rm_cached | ( | QString const & | file | ) |

| void Git::setDefaultBranch | ( | QString const & | branchname | ) |

| void Git::setRemoteURL | ( | const GitRemote & | remote | ) |

| bool Git::setSigningKey | ( | QString const & | id, |
| bool | global | ||
| ) |

| bool Git::setSignPolicy | ( | GitSource | source, |
| GitSignPolicy | policy | ||
| ) |

| void Git::setSshKey | ( | const QString & | sshkey | ) |

| void Git::setSubmodulePath | ( | const QString & | submodpath | ) |

| void Git::setUser | ( | GitUser const & | user, |
| bool | global | ||
| ) |

| void Git::setWorkingRepositoryDir | ( | QString const & | repo, |
| const QString & | sshkey | ||
| ) |

| QString Git::signingKey | ( | GitSource | purpose | ) |

| GitSignPolicy Git::signPolicy | ( | GitSource | source | ) |

| QString const & Git::sshKey | ( | ) | const |

| void Git::stage | ( | QString const & | path | ) |

| bool Git::stage | ( | QStringList const & | paths, |
| AbstractPtyProcess * | pty | ||
| ) |

| bool Git::stash | ( | ) |

| bool Git::stash_apply | ( | ) |

| bool Git::stash_drop | ( | ) |

| QString Git::status | ( | ) |

| std::vector< GitFileStatus > Git::status_s | ( | ) |

|
private |

| bool Git::submodule_add | ( | const GitCloneData & | data, |
| bool | force, | ||
| AbstractPtyProcess * | pty | ||
| ) |

| bool Git::submodule_update | ( | const GitSubmoduleUpdateData & | data, |
| AbstractPtyProcess * | pty | ||
| ) |

| QList< GitSubmoduleItem > Git::submodules | ( | ) |

| bool Git::tag | ( | QString const & | name, |
| GitHash const & | id = {} |
||
| ) |

| QList< GitTag > Git::tags | ( | ) |

| QByteArray Git::toQByteArray | ( | const std::optional< GitResult > & | var | ) | const |

| void Git::unsetDefaultBranch | ( | ) |

| void Git::unstage | ( | QString const & | path | ) |

| void Git::unstage | ( | QStringList const & | paths | ) |

| bool Git::unstage_all | ( | ) |

| QString Git::version | ( | ) |

|
inline |
|
friend |
|
private |