diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2013-08-15 08:06:04 +0300 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2013-08-19 11:45:02 +0200 |
commit | e1e19360732a2c4bf222b1d0113391b3e9d64e11 (patch) | |
tree | adf4992d93d9d05c8dde42e66149ee27c1efb182 /src/plugins/git/gitplugin.cpp | |
parent | bbbdee7c601e8b344e9b6af9446bf493e754e093 (diff) | |
download | qt-creator-e1e19360732a2c4bf222b1d0113391b3e9d64e11.tar.gz |
Git: Add reflog
Change-Id: Id328492826bdcf4b7f7e6933a9dc3931174de0fb
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Diffstat (limited to 'src/plugins/git/gitplugin.cpp')
-rw-r--r-- | src/plugins/git/gitplugin.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index 32b8c66f09..bb08db948c 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -409,6 +409,11 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage) SLOT(logRepository())); createRepositoryAction(localRepositoryMenu, + tr("Reflog"), Core::Id("Git.ReflogRepository"), + globalcontext, true, + SLOT(reflogRepository())); + + createRepositoryAction(localRepositoryMenu, tr("Clean..."), Core::Id("Git.CleanRepository"), globalcontext, true, SLOT(cleanRepository())); @@ -785,6 +790,13 @@ void GitPlugin::logRepository() m_gitClient->log(state.topLevel()); } +void GitPlugin::reflogRepository() +{ + const VcsBase::VcsBasePluginState state = currentState(); + QTC_ASSERT(state.hasTopLevel(), return); + m_gitClient->reflog(state.topLevel()); +} + void GitPlugin::undoFileChanges(bool revertStaging) { if (!ensureAllDocumentsSaved()) |