Git: git9

git9 @ dd4015a1b71b38a94586d538bcd48debc3dab7d6

git/fs \- git file server


.B -d
.B -m
.I mtpt


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
.B /mnt/git.
It does not cache mutable data, so any changes to the git repository will immediately be reflected in git/fs.

Git/fs serves a few levels of hierarchy.
The top level contains the following files and directories:

.B branch
Exposes branches. Branches are aliases for commit objects.

.B object
Exposes all objects in the git repository.
Objects may be commits, trees, or blobs.

This is an alias for the current commit.

Commits are also represented as small hierarchies. They contain
the following files:

.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 <>

.B hash
The commit id of the current branch

.B msg
The full text of the commit message.

.B parent
The list of parent commit ids of the current commit.
One parent is listed per line.

.B tree
A directory containing the tree associated with the
The timestamp of the files contained within this
hierarchy are the same as the date of the commit.

Trees are presented as directory listings, and blobs
as files.

.B .git
The git repository being expected.
.B .git/HEAD
A reference to the current HEAD.
Used to populate
.B /mnt/git/HEAD
The per-repository configuation for git tools.
.B $home/lib/git/config
The global configuration for git tools.

.B /sys/src/cmd/git/fs.c

.IR git (1)
.IR hg (1)
.IR hgfs (4)

Symlinks are only partially supported.
Symlinks are treated as regular files when reading.
Modifying symlinks is unsupported.

There is no way to inspect the raw objects. This is
a feature that would be useful for debugging.