summaryrefslogtreecommitdiffstats
path: root/doc/classes/Git.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/Git.html')
-rw-r--r--doc/classes/Git.html93
1 files changed, 87 insertions, 6 deletions
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 @@
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
+ <a href="../files/lib/git/author_rb.html">
+ lib/git/author.rb
+ </a>
+ <br />
<a href="../files/lib/git/base_rb.html">
lib/git/base.rb
</a>
@@ -124,6 +128,31 @@
<div id="contextContent">
+ <div id="description">
+ <p>
+<a href="Git.html">Git</a>/Ruby Library
+</p>
+<p>
+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.
+</p>
+<p>
+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.
+</p>
+<table>
+<tr><td valign="top"><a href="Git/Author.html">Author</a>:</td><td>Scott Chacon (<a href="mailto:schacon@gmail.com">schacon@gmail.com</a>)
+
+</td></tr>
+<tr><td valign="top">License:</td><td>MIT License
+
+</td></tr>
+</table>
+
+ </div>
</div>
@@ -149,7 +178,8 @@
<div id="class-list">
<h3 class="section-bar">Classes and Modules</h3>
- Class <a href="Git/Base.html" class="link">Git::Base</a><br />
+ Class <a href="Git/Author.html" class="link">Git::Author</a><br />
+Class <a href="Git/Base.html" class="link">Git::Base</a><br />
Class <a href="Git/Branch.html" class="link">Git::Branch</a><br />
Class <a href="Git/Branches.html" class="link">Git::Branches</a><br />
Class <a href="Git/Diff.html" class="link">Git::Diff</a><br />
@@ -175,7 +205,7 @@ Class <a href="Git/WorkingDirectory.html" class="link">Git::WorkingDirectory</a>
<tr class="top-aligned-row context-row">
<td class="context-item-name">VERSION</td>
<td>=</td>
- <td class="context-item-value">'1.0.1'</td>
+ <td class="context-item-value">'1.0.2'</td>
</tr>
</table>
</div>
@@ -200,11 +230,19 @@ Class <a href="Git/WorkingDirectory.html" class="link">Git::WorkingDirectory</a>
</div>
<div class="method-description">
+ <p>
+open a bare repository
+</p>
+<p>
+this takes the path to a bare git repo it expects not to be able to use a
+working directory so you can&#8217;t checkout stuff, commit things, etc.
+but you can do most read operations
+</p>
<p><a class="source-toggle" href="#"
onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
<div class="method-source-code" id="M000001-source">
<pre>
-<span class="ruby-comment cmt"># File lib/git.rb, line 36</span>
+<span class="ruby-comment cmt"># File lib/git.rb, line 51</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">bare</span>(<span class="ruby-identifier">git_dir</span>)
<span class="ruby-constant">Base</span>.<span class="ruby-identifier">bare</span>(<span class="ruby-identifier">git_dir</span>)
<span class="ruby-keyword kw">end</span>
@@ -223,11 +261,28 @@ Class <a href="Git/WorkingDirectory.html" class="link">Git::WorkingDirectory</a>
</div>
<div class="method-description">
+ <p>
+clones a remote repository
+</p>
+<p>
+options
+</p>
+<pre>
+ :bare =&gt; true (does a bare clone)
+ :repository =&gt; '/path/to/alt_git_dir'
+ :index =&gt; '/path/to/alt_index_file'
+</pre>
+<p>
+example
+</p>
+<pre>
+ Git.clone('git://repo.or.cz/rubygit.git', 'clone.git', :bare =&gt; true)
+</pre>
<p><a class="source-toggle" href="#"
onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
<div class="method-source-code" id="M000004-source">
<pre>
-<span class="ruby-comment cmt"># File lib/git.rb, line 48</span>
+<span class="ruby-comment cmt"># File lib/git.rb, line 88</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">clone</span>(<span class="ruby-identifier">repository</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span> = {})
<span class="ruby-constant">Base</span>.<span class="ruby-identifier">clone</span>(<span class="ruby-identifier">repository</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span>)
<span class="ruby-keyword kw">end</span>
@@ -246,11 +301,21 @@ Class <a href="Git/WorkingDirectory.html" class="link">Git::WorkingDirectory</a>
</div>
<div class="method-description">
+ <p>
+initialize a new git repository, defaults to the current working directory
+</p>
+<p>
+options
+</p>
+<pre>
+ :repository =&gt; '/path/to/alt_git_dir'
+ :index =&gt; '/path/to/alt_index_file'
+</pre>
<p><a class="source-toggle" href="#"
onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
<div class="method-source-code" id="M000003-source">
<pre>
-<span class="ruby-comment cmt"># File lib/git.rb, line 44</span>
+<span class="ruby-comment cmt"># File lib/git.rb, line 74</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">init</span>(<span class="ruby-identifier">working_dir</span> = <span class="ruby-value str">'.'</span>, <span class="ruby-identifier">options</span> = {})
<span class="ruby-constant">Base</span>.<span class="ruby-identifier">init</span>(<span class="ruby-identifier">working_dir</span>, <span class="ruby-identifier">options</span>)
<span class="ruby-keyword kw">end</span>
@@ -269,11 +334,27 @@ Class <a href="Git/WorkingDirectory.html" class="link">Git::WorkingDirectory</a>
</div>
<div class="method-description">
+ <p>
+open an existing git working directory
+</p>
+<p>
+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)
+</p>
+<p>
+options
+</p>
+<pre>
+ :repository =&gt; '/path/to/alt_git_dir'
+ :index =&gt; '/path/to/alt_index_file'
+</pre>
<p><a class="source-toggle" href="#"
onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
<div class="method-source-code" id="M000002-source">
<pre>
-<span class="ruby-comment cmt"># File lib/git.rb, line 40</span>
+<span class="ruby-comment cmt"># File lib/git.rb, line 65</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">working_dir</span>, <span class="ruby-identifier">options</span> = {})
<span class="ruby-constant">Base</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">working_dir</span>, <span class="ruby-identifier">options</span>)
<span class="ruby-keyword kw">end</span>