pygit2 gives us direct access to git and makes room for a lot of optimization. The alternative, using shell commands, would have been a pain to implement and so would have been tying it to a state too.
This is a simplified overview of the
Router class is used in order to dispatch paths to different
Views are used to offer different functionality depending on your current path.
They are divided into two super classes:
PassthroughView will work just like you would expect a normal directory to. It’s purpose is to map all of
FUSE's operations to the similar ones in
ReadOnlyView is used when user writes are not desired.
The subclasses of these are:
CurrentView– this is the view which handles the current directory and does the automated commits and pushes
HistoryView– this is the view which handles the history directory and categorizes commits by date
CommitView– this is the view which handles the
IndexView– this is the view which handles the
history/*day*/*commit*directory and shows you a read-only snapshot pointing to that commit
All workers inherit the
Peasant class which is nothing more than a specialized
Here are the workers with their more than explicit names:
gitfs uses the FetchWorker in order to bring your changes from upstream.
The FetchWorker will fetch, by default, at a period of 30 seconds (you can change the timeout at mount, using
-o fetch_timeout=5, for 5 seconds).
If nothing was changed, for more than 5min on the filesystem, gitfs will enter in idle mode. In this mode, will fetch each 30min. You can modify those parameters using
min_idle_times in order to change the amount of idle cycles required until gitfs will go in idle mode (by default 10 times, which means 5min) and
idle_fetch_timeout to control the period of time between fetches, for idle mode.