-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathgitfs.man
120 lines (118 loc) · 2.78 KB
/
gitfs.man
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
.TH GitFS 4
.SH Name
gitfs \- File server interface to Git scm
.SH Synopsis
mount {gitfs [-d] repo} mntpt
.SH Description
.B gitfs
is a file server that represents git repository. Git commands are executed by writing them into the
.I ctl
file. Result of a command is stored in the
.I data
file.
.PP
There's no "interactive" mode for
.I git-commit.
Commit message should be written to
.I data
file,
.PP
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.
.PP
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
.I git cat-file
.SH Options
.TP
.BI -d
is used to see messages from fileserver
.TP
repo is path to git repository. By default it searches for .git directory in the path
from current directory upto the /.
.SH Hierarchy
.TP
.B /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.
.TP
.B /status
File that is substitution for git-status command.
.TP
.B /tags
Directory, which contains tags.
.TP
.B /config
Repository specific configurations are stored in this file.
.TP
.B /exclude
File that contains patterns of file names to exclude from
.I git-add.
.TP
.B /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.
.TP
.B /files/*
This directory contains the files from repo/ directory.
.TP
.B /ctl
File that's used for operating with git. Commands can be send are: commit, gc, add, branch, reset, status, checkout, merge, rm.
.TP
.B /data
Results of executed commands in the
.I ctl
file are stored here.
.SH Examples
.B Mounting fileserver and reading logs
.LP
Mount git repository and read the unfiltered log file.
.nf
$ mount {gitfs .} mntpt
$ cat mntpt/log
<some log>
$ unmount mntpt
.fi
.LP
The same as above but with filtering and getting log for the last 2 weeks
.nf
$ echo 'log --since=2 weeks ago' > ctl
$ cat git_repo/data
<some log>
.fi
.LP
.B Simple commits.
.LP
.nf
Commit message is read from data file
$ echo checkout > ctl
# ...Some editing...
$ echo add file1 > ctl
$ echo rm file2 > ctl
$ echo commit > ctl
.fi
.LP
.B Merges
.LP
.nf
$ echo merge branchname > ctl
.LP
Result of merge is read from data file.
After resolving conflict you can add and commit:
.LP
$ echo add file1 > ctl
$ echo commit > ctl
.LP
.B Differences between trees and files
.LP
.nf
$ echo diff-tree <treeish1> <treeish2> > ctl
Difference between index and working directory
$ echo show-diff > ctl
.fi
.SH Source
gitfs.b
.SH See also
.SH Bugs