filesystem backed git repository
filesystem-backed read-only git repository object.
ties together all of the fs-based ODB backends, and the ref discovery mechanism.
var load = require'git-fs-repo'load'/path/to/repository/.git'var head = gitref'HEAD'hashgitfindhead
Load a git repository from dir.
ready will be
called with the error (if any), and the repository
Lookup a git object from the backends. Hash must be either a 40-character hexadecimal string, or a 20-byte Buffer.
If no object was found, there will be no error, but also no data.
If there was an error in any of the backends, it will be propagated
find is tightly bound to the repository object, since so
git-* projects rely on having a
find function provided.
So instead of doing:
var walk = require'git-walk-tree'repo = /* some repo */0;walkfind head_commitreturn repofindoid ready
You can do:
var walk = require'git-walk-tree'repo = /* some repo */0;walkrepofind head_commit
Lookup a reference by name. If follow is true or not given, it will dereference any intermediary symbolic references (i.e., refs that point at other refs.)
Return all references. If follow is true or not given, it will dereference symbolic links, and the returned list will include only one reference per unique hash.