2021-05-17 01:49:45 +00:00
|
|
|
.TH GITFS 4
|
|
|
|
.SH NAME
|
|
|
|
git/fs \- git file server
|
|
|
|
|
|
|
|
.SH SYNOPSIS
|
|
|
|
|
|
|
|
git/fs
|
|
|
|
[
|
|
|
|
.B -d
|
|
|
|
]
|
|
|
|
[
|
|
|
|
.B -m
|
|
|
|
.I mtpt
|
|
|
|
]
|
|
|
|
|
|
|
|
.SH DESCRIPTION
|
|
|
|
|
|
|
|
.PP
|
|
|
|
Git/fs serves a file system interface to a git repository in the
|
|
|
|
current directory.
|
|
|
|
This file system provides a read-only view into the repository contents.
|
|
|
|
By default, it is mounted on
|
2021-05-31 00:46:21 +00:00
|
|
|
.B $repo/.git/fs.
|
2021-05-17 01:49:45 +00:00
|
|
|
It does not cache mutable data, so any changes to the git repository will immediately be reflected in git/fs.
|
|
|
|
|
|
|
|
.PP
|
|
|
|
Git/fs serves a few levels of hierarchy.
|
|
|
|
The top level contains the following files and directories:
|
|
|
|
|
|
|
|
.TP
|
|
|
|
.B branch
|
|
|
|
Exposes branches. Branches are aliases for commit objects.
|
|
|
|
|
|
|
|
.TP
|
|
|
|
.B object
|
|
|
|
Exposes all objects in the git repository.
|
|
|
|
Objects may be commits, trees, or blobs.
|
|
|
|
|
|
|
|
.TP
|
|
|
|
.B HEAD
|
|
|
|
This is an alias for the current commit.
|
|
|
|
|
|
|
|
.PP
|
|
|
|
Commits are also represented as small hierarchies. They contain
|
|
|
|
the following files:
|
|
|
|
|
|
|
|
.TP
|
|
|
|
.B author
|
|
|
|
This is the author of the commit.
|
|
|
|
The contents of this file are free-form text, but conventionally
|
|
|
|
they take the form
|
|
|
|
.B Full Name <email@domain.here>
|
|
|
|
|
|
|
|
.TP
|
|
|
|
.B hash
|
|
|
|
The commit id of the current branch
|
|
|
|
|
|
|
|
.TP
|
|
|
|
.B msg
|
|
|
|
The full text of the commit message.
|
|
|
|
|
|
|
|
.TP
|
|
|
|
.B parent
|
|
|
|
The list of parent commit ids of the current commit.
|
|
|
|
One parent is listed per line.
|
|
|
|
|
|
|
|
.TP
|
|
|
|
.B tree
|
|
|
|
A directory containing the tree associated with the
|
|
|
|
commit.
|
|
|
|
The timestamp of the files contained within this
|
|
|
|
hierarchy are the same as the date of the commit.
|
|
|
|
|
|
|
|
.PP
|
|
|
|
Trees are presented as directory listings, and blobs
|
|
|
|
as files.
|
2021-06-22 23:55:54 +00:00
|
|
|
The repository controls the user permissions.
|
|
|
|
The group and world permissions are derived by masking
|
|
|
|
the user permissions with the permissions of the
|
|
|
|
.I .git
|
|
|
|
directory.
|
|
|
|
The user and group presented is the same as the user and
|
|
|
|
group of the
|
|
|
|
.I .git
|
|
|
|
directory.
|
2021-05-17 01:49:45 +00:00
|
|
|
|
|
|
|
.SH FILES
|
|
|
|
.TP
|
|
|
|
.B .git
|
|
|
|
The git repository being expected.
|
|
|
|
.TP
|
|
|
|
.B .git/HEAD
|
|
|
|
A reference to the current HEAD.
|
|
|
|
Used to populate
|
2021-05-31 00:46:21 +00:00
|
|
|
.B $repo/.git/fs/HEAD
|
2021-05-17 01:49:45 +00:00
|
|
|
.TP
|
|
|
|
.git/config
|
|
|
|
The per-repository configuation for git tools.
|
|
|
|
.TP
|
|
|
|
.B $home/lib/git/config
|
|
|
|
The global configuration for git tools.
|
|
|
|
|
|
|
|
.SH SOURCE
|
|
|
|
.TP
|
|
|
|
.B /sys/src/cmd/git/fs.c
|
|
|
|
|
|
|
|
.SH "SEE ALSO"
|
|
|
|
.IR git (1)
|
|
|
|
|
|
|
|
.SH BUGS
|
|
|
|
Symlinks are only partially supported.
|
2021-06-22 23:55:54 +00:00
|
|
|
They will be followed when reading, but a commit that
|
|
|
|
modifies a symlink is an error.
|
2021-05-17 01:49:45 +00:00
|
|
|
|
|
|
|
.PP
|
2021-06-22 23:55:54 +00:00
|
|
|
For efficiency, git/fs only loads repo permissions at startup
|
|
|
|
|
|
|
|
.PP
|
|
|
|
There is no way to inspect the raw objects.
|
|
|
|
Inspecting raw objects would be useful for debugging.
|
2021-05-17 01:49:45 +00:00
|
|
|
|
|
|
|
|