Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit da0ed09

Browse files
committed
Add: refresh() method to RepoMan
1 parent 63d17bc commit da0ed09

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

Libs/libRepoMan/RepoMan.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,13 @@
2424
#include "libRepoMan/Backend/ServiceRunner.hpp"
2525

2626
#include "libRepoMan/Services/OpenRepository.hpp"
27+
#include "libRepoMan/Services/RefreshRepository.hpp"
2728

2829
#include "libRepoMan/Data/RepoMan.hpp"
2930
#include "libRepoMan/Data/Repo.hpp"
3031

32+
#include "libLogger/Manager.hpp"
33+
3134
#include "libBlueSky/Application.hpp"
3235

3336
#include <QDebug>
@@ -192,6 +195,12 @@ namespace RM
192195
#endif
193196
}
194197

198+
void RepoMan::refresh(RefreshTypes what)
199+
{
200+
Log::Manager().addMessage(trUtf8("Refreshing git repositories..."));
201+
Backend::perform(new Services::RefreshRepository(activeRepository()));
202+
}
203+
195204
#if 0 // ###DEAD
196205
//-- RepoManPrivate ----------------------------------------------------------------------------
197206

Libs/libRepoMan/RepoMan.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@
2929
namespace RM
3030
{
3131

32+
enum class RefreshTypes
33+
{
34+
Repositories,
35+
Indicies,
36+
Worktrees
37+
};
38+
3239
namespace Frontend { class Branch; }
3340

3441
class REPOMAN_API RepoMan
@@ -42,6 +49,7 @@ namespace RM
4249
~RepoMan();
4350

4451
public:
52+
void refresh(RefreshTypes what);
4553
void open(const QString& path);
4654

4755
void closeAll();

0 commit comments

Comments
 (0)