-
Notifications
You must be signed in to change notification settings - Fork 5
man page for design with ctl file
Section: Devices and Network Interfaces (4)
Index
gitfs – File server interface to Git scm
is a file server that represents git repository. Git commands are executed by writing them into the
ctl
file. Result of a command is stored in the
data
file.
There’s no "interactive" mode for
git-commit.
Commit message should be written to
data
file,
Interactive add is done through utility called git/add, as stdin is used
by Styxserver. All operations with git/add works as some kind of shell for ctl.
Objects located in objects can be read as ordinary files. Result of reading files under
objects/ directory is the same as you could get from
git cat-file
- -d
-
is used to see messages from fileserver
- repo is path to git repository. By default it searches for .git directory in the path
-
from current directory upto the /.
- /log
-
File that contains log. If you want to use options for git-log
you can write options to ctl file and get results from data file.
This file contains unfiltered log of the repository, i.e. it’s the same
what git-log does by default. - /status
-
File that is substitution for git-status command.
- /tags
-
Directory, which contains tags.
- /config
-
Repository specific configurations are stored in this file.
- /exclude
-
File that contains patterns of file names to exclude from
git-add. - /objects/[0-9a-f][0-9a-f]
-
This directory object store associated with the repository. Each subdirectory contains objects(blobs, tags, trees, commits)
of the repository.
- /files/*
-
This directory contains the files from repo/ directory.
- /ctl
-
File that’s used for operating with git. Commands can be send are: commit, gc, add, branch, reset, status, checkout, merge, rm.
- /data
-
Results of executed commands in the
ctlfile are stored here.
Mount git repository and read the unfiltered log file.
$ mount {gitfs .} mntpt
$ cat mntpt/log
<some log>
$ unmount mntpt
The same as above but with filtering and getting log for the last 2 weeks
$ echo ‘log —since=2 weeks ago’ > ctl
$ cat git_repo/data
<some log>
Simple commits.
Commit message is read from data file
$ echo checkout > ctl
- …Some editing…
$ echo add file1 > ctl
$ echo rm file2 > ctl
$ echo commit > ctl
Merges
$ echo merge branchname > ctl
Result of merge is read from data file.
After resolving conflict you can add and commit:$ echo add file1 > ctl
Differences between trees and files
$ echo commit > ctl$ echo diff-tree <treeish1> <treeish2> > ctl
Difference between index and working directory
$ echo show-diff > ctl