22 lines
525 B
C++
22 lines
525 B
C++
#pragma once
|
|
#include <efsw/efsw.hpp>
|
|
#include <git2.h>
|
|
#include <string> // for operator+, to_string
|
|
|
|
using std::string;
|
|
|
|
class UpdateListener : public efsw::FileWatchListener {
|
|
public:
|
|
bool changes = false;
|
|
git_repository* repo = nullptr;
|
|
|
|
UpdateListener(git_repository *r) : repo(r) {};
|
|
|
|
void handleFileAction(efsw::WatchID watchid,
|
|
const string& dir,
|
|
const string& filename,
|
|
efsw::Action action,
|
|
string oldFilename) override;
|
|
|
|
void reset_state();
|
|
};
|