forked from qt-creator/qt-creator
Git: Support reflog also for branches
Change-Id: I9321ba4964d086d90aaf540a2006f95b94de8375 Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
committed by
Orgad Shaneh
parent
c9f1d84db7
commit
c728d04b52
@@ -278,6 +278,7 @@ public:
|
||||
void blameFile();
|
||||
void logProject();
|
||||
void logRepository();
|
||||
void reflogRepository();
|
||||
void undoFileChanges(bool revertStaging);
|
||||
void resetRepository();
|
||||
void recoverDeletedFiles();
|
||||
@@ -707,7 +708,7 @@ GitPluginPrivate::GitPluginPrivate()
|
||||
context, true, std::bind(&GitPluginPrivate::logRepository, this));
|
||||
|
||||
createRepositoryAction(localRepositoryMenu, tr("Reflog"), "Git.ReflogRepository",
|
||||
context, true, &GitClient::reflog);
|
||||
context, true, std::bind(&GitPluginPrivate::reflogRepository, this));
|
||||
|
||||
createRepositoryAction(localRepositoryMenu, tr("Clean..."), "Git.CleanRepository",
|
||||
context, true, [this] { cleanRepository(); });
|
||||
@@ -1057,6 +1058,13 @@ void GitPluginPrivate::logRepository()
|
||||
m_gitClient.log(state.topLevel());
|
||||
}
|
||||
|
||||
void GitPluginPrivate::reflogRepository()
|
||||
{
|
||||
const VcsBasePluginState state = currentState();
|
||||
QTC_ASSERT(state.hasTopLevel(), return);
|
||||
m_gitClient.reflog(state.topLevel());
|
||||
}
|
||||
|
||||
void GitPluginPrivate::undoFileChanges(bool revertStaging)
|
||||
{
|
||||
if (IDocument *document = EditorManager::currentDocument()) {
|
||||
|
Reference in New Issue
Block a user