GITFS(4)                                                 GITFS(4)

     NAME
          git/fs - git file server

     SYNOPSIS
          git/fs [ -d ] [ -m mtpt ]

     DESCRIPTION
          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 $repo/.git/fs. 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 con-
          tains the following files and directories:

          branch
               Exposes branches. Branches are aliases for commit
               objects.

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

          HEAD This is an alias for the current commit.

          Commits are also represented as small hierarchies. They con-
          tain the following files:

          author
               This is the author of the commit.  The contents of this
               file are free-form text, but conventionally they take
               the form Full Name <email@domain.here>

          hash The commit id of the current branch

          msg  The full text of the commit message.

     Page 1                       Plan 9             (printed 5/22/22)

     GITFS(4)                                                 GITFS(4)

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

          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.

          Trees are presented as directory listings, and blobs as
          files.  The repository controls the user permissions.  The
          group and world permissions are derived by masking the user
          permissions with the permissions of the .git directory.  The
          user and group presented is the same as the user and group
          of the .git directory.

     FILES
          .git The git repository being expected.

          .git/HEAD
               A reference to the current HEAD.  Used to populate
               $repo/.git/fs/HEAD

          The per-repository configuation for git tools.

          $home/lib/git/config
               The global configuration for git tools.

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

     SEE ALSO
          git(1)

     BUGS
          Symlinks are only partially supported.  They will be fol-
          lowed when reading, but a commit that modifies a symlink is
          an error.

          For efficiency, git/fs only loads repo permissions at
          startup

          There is no way to inspect the raw objects.  Inspecting raw
          objects would be useful for debugging.

     Page 2                       Plan 9             (printed 5/22/22)

     GITFS(4)                                                 GITFS(4)

     Page 3                       Plan 9             (printed 5/22/22)