From ec84d83512ebd9e9c3d49c367aa6c279735a7890 Mon Sep 17 00:00:00 2001 From: Sam Date: Sat, 2 Apr 2011 14:38:35 +1000 Subject: [PATCH] Begun work on documentation. --- docs/gen/gitteh.js | 33 +++++++++++++++++++++++++++++++++ docs/gen/repository.js | 6 ++++++ 2 files changed, 39 insertions(+) create mode 100644 docs/gen/gitteh.js create mode 100644 docs/gen/repository.js diff --git a/docs/gen/gitteh.js b/docs/gen/gitteh.js new file mode 100644 index 0000000..32df44e --- /dev/null +++ b/docs/gen/gitteh.js @@ -0,0 +1,33 @@ +/** + * This is the namespace of the Gitteh module. + * @namespace + * @example + * var gitteh = require("gitteh"); + */ +var Gitteh = { }; + +/** + * Opens a Git repository at the location provided. You can either provide a + * path to a Git repository, which will open the repository "bare" (no working + * directory), or you can provide an object containing paths to the various + * critical Git directories needed for Git to operate. + * @param {String|Object} path + * @param {String} path.gitDirectory The path to the Git repository folder (e.g /foo/.git) + * @param {String} [path.workTree] The path to the Git working directory (e.g /foo). Omitting this will assume the repository is bare. + * @param {String} [path.objectDirectory] The path to the ODB directory (e.g /foo/.git/objects). Omitting this will default to path.gitDirectory + "/objects" + * @param {String} [path.indexFile] The path to the repository index file (e.g /foo/.git/index). Omitting this will default to path.gitDirectory + "/index" + * @param {Function} [callback] If provided, the repository will be opened asynchronously, and the provided callback will be fired when the repository has been opened. + * @returns {Repository} + * @throws If the path provided is incorrect, or the repository is corrupt in some way. + */ +Gitteh.openRepository = function(path) { }; + +/** + * Creates a new Git repository at the provided path. The repository will be + * created at the path provided, unless bare is set to true, in which case the + * repository will be initialized in a .git directory inside the path + * provided. + * @param {String} path The path to initialize the new Git repository in. + * @param {Boolean} [bare] Initialize the repository as bare or "checked out". + * @param {Function} [callback] If provided, the repository will be created asynchronously. The provided callback will be fired when the repository has been created. +Gitteh.initRepository = function(path, bare, callback) { }; \ No newline at end of file diff --git a/docs/gen/repository.js b/docs/gen/repository.js new file mode 100644 index 0000000..f61e032 --- /dev/null +++ b/docs/gen/repository.js @@ -0,0 +1,6 @@ +/** + * Represents an open Git repository. The majority of the functionality offered + * by Gitteh is contained in here. + * @class + */ +var Repository = function() {};