shithub: git9

Download patch

ref: 9cf449a1f37eae10401743042dee0ff1814cb4d6
parent: a1a84bb65a0a2e072230b62cffb8974e3e1af5a3
author: Ori Bernstein <[email protected]>
date: Mon Feb 3 15:54:13 EST 2020

split gitfs documentation to its own manpage

--- a/git.1
+++ b/git.1
@@ -1,6 +1,6 @@
 .TH GIT 1
 .SH NAME
-git, git/conf, git/fs, git/query, git/walk, git/clone, git/branch,
+git, git/conf, git/query, git/walk, git/clone, git/branch,
 git/commit, git/diff, git/init, git/log, git/merge, git/push, git/pull
 \- Manage git repositories.
 
@@ -59,11 +59,6 @@
 ]
 .I file...
 .PP
-.B git/fs
-[
-.B -d
-]
-.PP
 .B git/export
 [
 .I commits...
@@ -240,11 +235,6 @@
 .I upstream
 instead of the configured origin.
 
-.B Git/fs
-provides a read-only file system mounted on /mnt/git.
-It provides a  view into the repository contents to allow convenient inspection of repository structure.
-Surrounding scripts and binaries manipulate the repository contents directly.
-These changes will be immediately mirrored in the file system.
 
 .PP
 Git/fs serves the following directories:
@@ -431,6 +421,7 @@
 .IR hg (1)
 .IR replica (1)
 .IR patch (1)
+.IR gitfs (4)
 .IR diff3
 
 .SH BUGS
--- /dev/null
+++ b/gitfs.4
@@ -1,0 +1,112 @@
+.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
+.B /mnt/git.
+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 protected]>
+
+.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.
+
+.SH FILES
+.TP
+.B .git
+The git repository being expected.
+.TP
+.B .git/HEAD
+A reference to the current HEAD.
+Used to populate
+.B /mnt/git/HEAD
+.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)
+.IR hg (1)
+.IR hgfs (4)
+
+.SH BUGS
+Symlinks get garbled. Instead of being followed,
+they get served as files containing the path to the
+object. This garbling is undetectable.
+
+.PP
+There is no way to inspect the raw objects. This is
+a feature that would be useful for debugging.
+
+
--- a/mkfile
+++ b/mkfile
@@ -46,6 +46,7 @@
 	for (i in $RC)
 		mk $MKFLAGS $i.rcinstall
 	cp git.1 /sys/man/1/git
+	cp gitfs.4 /sys/man/4/gitfs
 	cp common.rc /sys/lib/git/common.rc
 	mk $MKFLAGS /sys/lib/git/template