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

Commit 05ff85f

Browse files
committed
Add: refresh() method to RepoMan
1 parent 0847b99 commit 05ff85f

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
@@ -28,6 +28,13 @@
2828
namespace RM
2929
{
3030

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

3340
class REPOMAN_API RepoMan
@@ -41,6 +48,7 @@ namespace RM
4148
~RepoMan();
4249

4350
public:
51+
void refresh(RefreshTypes what);
4452
void open(const QString& path);
4553

4654
void closeAll();

0 commit comments

Comments
 (0)