Git: Add reflog

Change-Id: Id328492826bdcf4b7f7e6933a9dc3931174de0fb
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Orgad Shaneh
2013-08-15 08:06:04 +03:00
committed by Orgad Shaneh
parent bbbdee7c60
commit e1e1936073
4 changed files with 35 additions and 0 deletions

View File

@@ -408,6 +408,11 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
globalcontext, true,
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())