-
Notifications
You must be signed in to change notification settings - Fork 3
/
README
40 lines (29 loc) · 1.41 KB
/
README
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
Gitfiles provides support for browsing Git repositories inside Acme.
It works like, and is based on, Netfiles[1]. Gitfiles presents read-only
access to a fake filesystem of files stored in Git. Gitfiles accepts paths
of the form
/path/to/repo@tree-ish/repository/path
Where /path/to/repo is a valid Git repository, and tree-ish[2] is a valid
tree, commit or tag object name.
Gitfiles is best used with the following plumbing rules. The first rule
plumbs paths to Gitfiles; the second rule plumbs Git commits, formatted
so that their diff shows Gitfiles paths.
kind is text
data matches '[a-zA-Z0-9_\-./~{}@]+('$addr')?'
data matches '((/[a-zA-Z0-9_\-./]+)@[a-zA-Z0-9_\-./~{}@]+)('$addr')?'
data set $1
arg isdir $2
attr add addr=$4
plumb to gitfileedit
plumb client Gitfiles
type is text
data matches '[a-zA-Z¡-0-9_\-./]+'
data matches '([0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f])[0-9a-f]*'
plumb start rc -c 'cd '''$wdir'''; root=`{git rev-parse --show-toplevel}; rev='''$1'''; {gitfileshow $rev} >[2=1] | nobs | plumb -i -d edit -a ''action=showdata filename=''$root/+$rev'
Installation
Gitfiles is a plan9ports[3] program. Install with mk:
% mk install
which will build and then install the binaries into $PLAN9/bin.
[1] http://swtch.com/plan9port/man/man1/netfiles.html
[2] http://stackoverflow.com/questions/4044368/what-does-tree-ish-mean-in-git
[3] http://swtch.com/plan9port/