From 38f009d6d0aa35b13d19575611db1c724a9d1a5b Mon Sep 17 00:00:00 2001 From: scott Chacon Date: Tue, 13 Nov 2007 07:36:50 -0800 Subject: [PATCH] updated a bunch of the documentation --- README | 21 + TODO | 5 + doc/classes/Git.html | 93 ++- doc/classes/Git/{Object/Tag.html => Author.html} | 75 +-- doc/classes/Git/Base.html | 734 +++++++++++++-------- doc/classes/Git/Branch.html | 122 ++-- doc/classes/Git/Branches.html | 72 +- doc/classes/Git/Diff.html | 128 ++-- doc/classes/Git/Diff/DiffFile.html | 24 +- doc/classes/Git/Lib.html | 582 +++++++++------- doc/classes/Git/Object.html | 20 +- doc/classes/Git/Object/AbstractObject.html | 114 ++-- doc/classes/Git/Object/Blob.html | 23 +- .../Object/{AbstractObject.html => Commit.html} | 248 +++---- doc/classes/Git/Object/Tag.html | 40 +- doc/classes/Git/Object/Tree.html | 142 +++- doc/classes/Git/Path.html | 36 +- doc/classes/Git/Remote.html | 84 +-- doc/created.rid | 2 +- doc/files/README.html | 51 +- .../lib/git/{object_rb.html => author_rb.html} | 8 +- doc/files/lib/git/base_rb.html | 2 +- doc/files/lib/git/lib_rb.html | 2 +- doc/files/lib/git/object_rb.html | 2 +- doc/files/lib/git_rb.html | 3 +- doc/fr_class_index.html | 1 + doc/fr_file_index.html | 1 + doc/fr_method_index.html | 379 ++++++----- lib/git.rb | 46 ++ lib/git/base.rb | 96 ++- lib/git/object.rb | 38 +- 31 files changed, 1933 insertions(+), 1261 deletions(-) copy doc/classes/Git/{Object/Tag.html => Author.html} (58%) copy doc/classes/Git/Object/{AbstractObject.html => Commit.html} (52%) copy doc/files/lib/git/{object_rb.html => author_rb.html} (93%) rewrite doc/fr_method_index.html (68%) diff --git a/README b/README index cc37f4c..c10117d 100644 --- a/README +++ b/README @@ -19,6 +19,27 @@ but eventually I'll replace that with either C bindings to libgit or libgit-thin, or I'll write pure ruby handlers for at least some of the Git stuff. += Major Objects + +Git::Base - this is the object returned from a Git.open or Git.clone. +Most major actions are called from this object. + +Git::Object - this is the base object for your tree, blob and commit objects, +returned from @git.gtree or @git.object calls. the Git::AbstractObject will +have most of the calls in common for all those objects. + +Git::Diff - returns from a @git.diff command. It is an Enumerable that returns +Git::Diff:DiffFile objects from which you can get per file patches and insertion/deletion +statistics. You can also get total statistics from the Git::Diff object directly. + +Git::Status + +Git::Branches + +Git::Remote + +Git::Log + = Examples diff --git a/TODO b/TODO index 0354005..9ae76f5 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,8 @@ +* more documentation + +* compatible with git 1.4 + +* git archive * More Error Examples diff --git a/doc/classes/Git.html b/doc/classes/Git.html index 2fdebb8..523491f 100644 --- a/doc/classes/Git.html +++ b/doc/classes/Git.html @@ -55,6 +55,10 @@ In: + + lib/git/author.rb + +
lib/git/base.rb @@ -124,6 +128,31 @@
+
+

+Git/Ruby Library +

+

+This provides bindings for working with git in complex interactions, +including branching and merging, object inspection and manipulation, +history, patch generation and more. You should be able to do most +fundamental git operations with this library. +

+

+This module provides the basic functions to open a git reference to work +with. You can open a working directory, open a bare repository, initialize +a new repo or clone an existing remote repository. +

+ + + +
Author:Scott Chacon (schacon@gmail.com) + +
License:MIT License + +
+ +
@@ -149,7 +178,8 @@

Classes and Modules

- Class Git::Base
+ Class Git::Author
+Class Git::Base
Class Git::Branch
Class Git::Branches
Class Git::Diff
@@ -175,7 +205,7 @@ Class Git::WorkingDirectory VERSION = - '1.0.1' + '1.0.2'
@@ -200,11 +230,19 @@ Class Git::WorkingDirectory
+

+open a bare repository +

+

+this takes the path to a bare git repo it expects not to be able to use a +working directory so you can’t checkout stuff, commit things, etc. +but you can do most read operations +

[Source]

-# File lib/git.rb, line 36
+# File lib/git.rb, line 51
   def self.bare(git_dir)
     Base.bare(git_dir)
   end
@@ -223,11 +261,28 @@ Class Git::WorkingDirectory
         
+

+clones a remote repository +

+

+options +

+
+  :bare => true (does a bare clone)
+  :repository => '/path/to/alt_git_dir'
+  :index => '/path/to/alt_index_file'
+
+

+example +

+
+ Git.clone('git://repo.or.cz/rubygit.git', 'clone.git', :bare => true)
+

[Source]

-# File lib/git.rb, line 48
+# File lib/git.rb, line 88
   def self.clone(repository, name, options = {})
     Base.clone(repository, name, options)
   end
@@ -246,11 +301,21 @@ Class Git::WorkingDirectory
         
+

+initialize a new git repository, defaults to the current working directory +

+

+options +

+
+  :repository => '/path/to/alt_git_dir'
+  :index => '/path/to/alt_index_file'
+

[Source]

-# File lib/git.rb, line 44
+# File lib/git.rb, line 74
   def self.init(working_dir = '.', options = {})
     Base.init(working_dir, options)
   end
@@ -269,11 +334,27 @@ Class Git::WorkingDirectory
         
+

+open an existing git working directory +

+

+this will most likely be the most common way to create a git reference, +referring to a working directory. if not provided in the options, the +library will assume your git_dir and index are in the default place (.git/, +.git/index) +

+

+options +

+
+  :repository => '/path/to/alt_git_dir'
+  :index => '/path/to/alt_index_file'
+

[Source]

-# File lib/git.rb, line 40
+# File lib/git.rb, line 65
   def self.open(working_dir, options = {})
     Base.open(working_dir, options)
   end
diff --git a/doc/classes/Git/Object/Tag.html b/doc/classes/Git/Author.html
similarity index 58%
copy from doc/classes/Git/Object/Tag.html
copy to doc/classes/Git/Author.html
index 260b4c4..85441f9 100644
--- a/doc/classes/Git/Object/Tag.html
+++ b/doc/classes/Git/Author.html
@@ -5,10 +5,10 @@
 
 
 
-  Class: Git::Object::Tag
+  Class: Git::Author
   
   
-  
+