diff options
author | scott Chacon <schacon@agadorsparticus.(none)> | 2007-11-16 13:24:30 -0800 |
---|---|---|
committer | scott Chacon <schacon@agadorsparticus.(none)> | 2007-11-16 13:24:30 -0800 |
commit | bc60052b519b8b991e50b8ccb30f2b76ad125996 (patch) | |
tree | c7e50409f58e58c852793544a901850498c00f9b | |
parent | be47ad8aea4f854fc2d6773456fb28f3e9f519e7 (diff) | |
download | third_party-ruby-git-bc60052b519b8b991e50b8ccb30f2b76ad125996.tar.gz third_party-ruby-git-bc60052b519b8b991e50b8ccb30f2b76ad125996.tar.xz third_party-ruby-git-bc60052b519b8b991e50b8ccb30f2b76ad125996.zip |
updated the docs
28 files changed, 2109 insertions, 1141 deletions
diff --git a/History.txt b/History.txt index 83361b5..b7b7bc3 100644 --- a/History.txt +++ b/History.txt @@ -1,8 +1,16 @@ -== 1.0.1 +== 1.0.3 -* Initial version +* Sped up most of the operations +* Added some predicate functions (commit?, tree?, etc) +* Added a number of lower level operations (read-tree, write-tree, checkout-index, etc) +* Fixed a bug with using bare repositories +* Updated a good amount of the documentation == 1.0.2 * Added methods to the git objects that might be helpful +== 1.0.1 + +* Initial version + @@ -5,7 +5,7 @@ require 'rake/gempackagetask' spec = Gem::Specification.new do |s| s.platform = Gem::Platform::RUBY s.name = "git" - s.version = "1.0.2" + s.version = "1.0.3" s.author = "Scott Chacon" s.email = "schacon@gmail.com" s.summary = "A package for using Git in Ruby code." diff --git a/doc/classes/Git.html b/doc/classes/Git.html index 523491f..b9a6a0a 100644 --- a/doc/classes/Git.html +++ b/doc/classes/Git.html @@ -205,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.2'</td> + <td class="context-item-value">'1.0.3'</td> </tr> </table> </div> diff --git a/doc/classes/Git/Base.html b/doc/classes/Git/Base.html index 9c994c6..d3dec3d 100644 --- a/doc/classes/Git/Base.html +++ b/doc/classes/Git/Base.html @@ -88,48 +88,62 @@ <h3 class="section-bar">Methods</h3> <div class="name-list"> - <a href="#M000103">add</a> - <a href="#M000115">add_remote</a> - <a href="#M000118">add_tag</a> - <a href="#M000080">bare</a> - <a href="#M000098">branch</a> - <a href="#M000097">branches</a> - <a href="#M000088">chdir</a> - <a href="#M000109">checkout</a> - <a href="#M000083">clone</a> - <a href="#M000107">commit</a> - <a href="#M000108">commit_all</a> - <a href="#M000090">config</a> - <a href="#M000121">current_branch</a> - <a href="#M000102">diff</a> - <a href="#M000085">dir</a> - <a href="#M000110">fetch</a> - <a href="#M000094">gblob</a> - <a href="#M000093">gcommit</a> - <a href="#M000101">grep</a> - <a href="#M000092">gtree</a> - <a href="#M000087">index</a> - <a href="#M000082">init</a> - <a href="#M000100">lib</a> - <a href="#M000095">log</a> - <a href="#M000112">merge</a> - <a href="#M000084">new</a> - <a href="#M000091">object</a> - <a href="#M000081">open</a> - <a href="#M000113">pull</a> - <a href="#M000111">push</a> - <a href="#M000099">remote</a> - <a href="#M000114">remotes</a> - <a href="#M000104">remove</a> - <a href="#M000119">repack</a> - <a href="#M000086">repo</a> - <a href="#M000089">repo_size</a> - <a href="#M000105">reset</a> - <a href="#M000106">reset_hard</a> - <a href="#M000120">revparse</a> - <a href="#M000096">status</a> - <a href="#M000117">tag</a> - <a href="#M000116">tags</a> + <a href="#M000114">add</a> + <a href="#M000126">add_remote</a> + <a href="#M000129">add_tag</a> + <a href="#M000130">archive</a> + <a href="#M000089">bare</a> + <a href="#M000109">branch</a> + <a href="#M000108">branches</a> + <a href="#M000099">chdir</a> + <a href="#M000120">checkout</a> + <a href="#M000134">checkout_index</a> + <a href="#M000092">clone</a> + <a href="#M000118">commit</a> + <a href="#M000119">commit_all</a> + <a href="#M000137">commit_tree</a> + <a href="#M000101">config</a> + <a href="#M000144">current_branch</a> + <a href="#M000113">diff</a> + <a href="#M000094">dir</a> + <a href="#M000121">fetch</a> + <a href="#M000105">gblob</a> + <a href="#M000104">gcommit</a> + <a href="#M000112">grep</a> + <a href="#M000103">gtree</a> + <a href="#M000096">index</a> + <a href="#M000091">init</a> + <a href="#M000111">lib</a> + <a href="#M000106">log</a> + <a href="#M000140">ls_files</a> + <a href="#M000123">merge</a> + <a href="#M000093">new</a> + <a href="#M000102">object</a> + <a href="#M000090">open</a> + <a href="#M000124">pull</a> + <a href="#M000122">push</a> + <a href="#M000135">read_tree</a> + <a href="#M000110">remote</a> + <a href="#M000125">remotes</a> + <a href="#M000115">remove</a> + <a href="#M000131">repack</a> + <a href="#M000095">repo</a> + <a href="#M000100">repo_size</a> + <a href="#M000116">reset</a> + <a href="#M000117">reset_hard</a> + <a href="#M000143">revparse</a> + <a href="#M000098">set_index</a> + <a href="#M000097">set_working</a> + <a href="#M000107">status</a> + <a href="#M000128">tag</a> + <a href="#M000127">tags</a> + <a href="#M000139">update_ref</a> + <a href="#M000132">with_index</a> + <a href="#M000133">with_temp_index</a> + <a href="#M000142">with_temp_working</a> + <a href="#M000141">with_working</a> + <a href="#M000138">write_and_commit_tree</a> + <a href="#M000136">write_tree</a> </div> </div> @@ -151,11 +165,11 @@ <div id="methods"> <h3 class="section-bar">Public Class methods</h3> - <div id="method-M000080" class="method-detail"> - <a name="M000080"></a> + <div id="method-M000089" class="method-detail"> + <a name="M000089"></a> <div class="method-heading"> - <a href="#M000080" class="method-signature"> + <a href="#M000089" class="method-signature"> <span class="method-name">bare</span><span class="method-args">(git_dir)</span> </a> </div> @@ -166,10 +180,10 @@ opens a bare <a href="../Git.html">Git</a> <a href="Repository.html">Repository</a> - no working directory options </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000080-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000080-source"> + onclick="toggleCode('M000089-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000089-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 10</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 12</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-keyword kw">self</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">:repository</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">git_dir</span> <span class="ruby-keyword kw">end</span> @@ -178,11 +192,11 @@ href="Repository.html">Repository</a> - no working directory options </div> </div> - <div id="method-M000083" class="method-detail"> - <a name="M000083"></a> + <div id="method-M000092" class="method-detail"> + <a name="M000092"></a> <div class="method-heading"> - <a href="#M000083" class="method-signature"> + <a href="#M000092" class="method-signature"> <span class="method-name">clone</span><span class="method-args">(repository, name, opts = {})</span> </a> </div> @@ -207,10 +221,10 @@ options: :index_file </pre> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000083-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000083-source"> + onclick="toggleCode('M000092-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000092-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 58</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 60</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">opts</span> = {}) <span class="ruby-comment cmt"># run git-clone </span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Lib</span>.<span class="ruby-identifier">new</span>.<span class="ruby-identifier">clone</span>(<span class="ruby-identifier">repository</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">opts</span>)) @@ -220,11 +234,11 @@ options: </div> </div> - <div id="method-M000082" class="method-detail"> - <a name="M000082"></a> + <div id="method-M000091" class="method-detail"> + <a name="M000091"></a> <div class="method-heading"> - <a href="#M000082" class="method-signature"> + <a href="#M000091" class="method-signature"> <span class="method-name">init</span><span class="method-args">(working_dir, opts = {})</span> </a> </div> @@ -241,10 +255,10 @@ options: :index_file </pre> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000082-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000082-source"> + onclick="toggleCode('M000091-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000091-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 29</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 31</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-identifier">opts</span> = {}) <span class="ruby-identifier">default</span> = {<span class="ruby-identifier">:working_directory</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">working_dir</span>, <span class="ruby-identifier">:repository</span> =<span class="ruby-operator">></span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">working_dir</span>, <span class="ruby-value str">'.git'</span>)} @@ -265,21 +279,21 @@ options: </div> </div> - <div id="method-M000084" class="method-detail"> - <a name="M000084"></a> + <div id="method-M000093" class="method-detail"> + <a name="M000093"></a> <div class="method-heading"> - <a href="#M000084" class="method-signature"> + <a href="#M000093" class="method-signature"> <span class="method-name">new</span><span class="method-args">(options = {})</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000084-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000084-source"> + onclick="toggleCode('M000093-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000093-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 63</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 65</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span> = {}) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">working_dir</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:working_directory</span>] <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:repository</span>] = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">working_dir</span>, <span class="ruby-value str">'.git'</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">options</span>[<span class="ruby-identifier">:repository</span>] @@ -295,11 +309,11 @@ options: </div> </div> - <div id="method-M000081" class="method-detail"> - <a name="M000081"></a> + <div id="method-M000090" class="method-detail"> + <a name="M000090"></a> <div class="method-heading"> - <a href="#M000081" class="method-signature"> + <a href="#M000090" class="method-signature"> <span class="method-name">open</span><span class="method-args">(working_dir, opts={})</span> </a> </div> @@ -310,10 +324,10 @@ opens a new <a href="../Git.html">Git</a> Project from a working directory you can specify non-standard git_dir and index file in the options </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000081-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000081-source"> + onclick="toggleCode('M000090-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000090-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 16</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 18</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">opts</span>={}) <span class="ruby-identifier">default</span> = {<span class="ruby-identifier">:working_directory</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">working_dir</span>} <span class="ruby-identifier">git_options</span> = <span class="ruby-identifier">default</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">opts</span>) @@ -327,11 +341,11 @@ you can specify non-standard git_dir and index file in the options <h3 class="section-bar">Public Instance methods</h3> - <div id="method-M000103" class="method-detail"> - <a name="M000103"></a> + <div id="method-M000114" class="method-detail"> + <a name="M000114"></a> <div class="method-heading"> - <a href="#M000103" class="method-signature"> + <a href="#M000114" class="method-signature"> <span class="method-name">add</span><span class="method-args">(path = '.')</span> </a> </div> @@ -341,10 +355,10 @@ you can specify non-standard git_dir and index file in the options adds files from the working directory to the git repository </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000103-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000103-source"> + onclick="toggleCode('M000114-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000114-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 212</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 234</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add</span>(<span class="ruby-identifier">path</span> = <span class="ruby-value str">'.'</span>) <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">path</span>) <span class="ruby-keyword kw">end</span> @@ -353,11 +367,11 @@ adds files from the working directory to the git repository </div> </div> - <div id="method-M000115" class="method-detail"> - <a name="M000115"></a> + <div id="method-M000126" class="method-detail"> + <a name="M000126"></a> <div class="method-heading"> - <a href="#M000115" class="method-signature"> + <a href="#M000126" class="method-signature"> <span class="method-name">add_remote</span><span class="method-args">(name, url, opts = {})</span> </a> </div> @@ -373,10 +387,10 @@ href="Base.html">Git::Base</a> object if it’s a local reference @git.merge('scotts_git/master') </pre> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000115-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000115-source"> + onclick="toggleCode('M000126-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000126-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 290</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 312</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_remote</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">url</span>, <span class="ruby-identifier">opts</span> = {}) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">url</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>) <span class="ruby-identifier">url</span> = <span class="ruby-identifier">url</span>.<span class="ruby-identifier">repo</span>.<span class="ruby-identifier">path</span> @@ -389,11 +403,11 @@ href="Base.html">Git::Base</a> object if it’s a local reference </div> </div> - <div id="method-M000118" class="method-detail"> - <a name="M000118"></a> + <div id="method-M000129" class="method-detail"> + <a name="M000129"></a> <div class="method-heading"> - <a href="#M000118" class="method-signature"> + <a href="#M000129" class="method-signature"> <span class="method-name">add_tag</span><span class="method-args">(tag_name)</span> </a> </div> @@ -403,10 +417,10 @@ href="Base.html">Git::Base</a> object if it’s a local reference creates a new git tag (Git::Tag) </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000118-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000118-source"> + onclick="toggleCode('M000129-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000129-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 309</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 331</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_tag</span>(<span class="ruby-identifier">tag_name</span>) <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">tag</span>(<span class="ruby-identifier">tag_name</span>) <span class="ruby-identifier">tag</span>(<span class="ruby-identifier">tag_name</span>) @@ -416,11 +430,37 @@ creates a new git tag (Git::Tag) </div> </div> - <div id="method-M000098" class="method-detail"> - <a name="M000098"></a> + <div id="method-M000130" class="method-detail"> + <a name="M000130"></a> <div class="method-heading"> - <a href="#M000098" class="method-signature"> + <a href="#M000130" class="method-signature"> + <span class="method-name">archive</span><span class="method-args">(treeish, file = nil, opts = {})</span> + </a> + </div> + + <div class="method-description"> + <p> +creates an archive file of the given tree-ish +</p> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000130-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000130-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 337</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">archive</span>(<span class="ruby-identifier">treeish</span>, <span class="ruby-identifier">file</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">opts</span> = {}) + <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">object</span>(<span class="ruby-identifier">treeish</span>).<span class="ruby-identifier">archive</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">opts</span>) + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000109" class="method-detail"> + <a name="M000109"></a> + + <div class="method-heading"> + <a href="#M000109" class="method-signature"> <span class="method-name">branch</span><span class="method-args">(branch_name = 'master')</span> </a> </div> @@ -430,10 +470,10 @@ creates a new git tag (Git::Tag) returns a <a href="Branch.html">Git::Branch</a> object for branch_name </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000098-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000098-source"> + onclick="toggleCode('M000109-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000109-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 167</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 189</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">branch</span>(<span class="ruby-identifier">branch_name</span> = <span class="ruby-value str">'master'</span>) <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Branch</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">branch_name</span>) <span class="ruby-keyword kw">end</span> @@ -442,11 +482,11 @@ returns a <a href="Branch.html">Git::Branch</a> object for branch_name </div> </div> - <div id="method-M000097" class="method-detail"> - <a name="M000097"></a> + <div id="method-M000108" class="method-detail"> + <a name="M000108"></a> <div class="method-heading"> - <a href="#M000097" class="method-signature"> + <a href="#M000108" class="method-signature"> <span class="method-name">branches</span><span class="method-args">()</span> </a> </div> @@ -457,10 +497,10 @@ returns a <a href="Branches.html">Git::Branches</a> object of all the <a href="Branch.html">Git::Branch</a> objects for this repo </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000097-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000097-source"> + onclick="toggleCode('M000108-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000108-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 162</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 184</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">branches</span> <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Branches</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>) <span class="ruby-keyword kw">end</span> @@ -469,11 +509,11 @@ href="Branch.html">Git::Branch</a> objects for this repo </div> </div> - <div id="method-M000088" class="method-detail"> - <a name="M000088"></a> + <div id="method-M000099" class="method-detail"> + <a name="M000099"></a> <div class="method-heading"> - <a href="#M000088" class="method-signature"> + <a href="#M000099" class="method-signature"> <span class="method-name">chdir</span><span class="method-args">() {|dir.path| ...}</span> </a> </div> @@ -493,10 +533,10 @@ example end </pre> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000088-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000088-source"> + onclick="toggleCode('M000099-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000099-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 102</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 115</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">chdir</span> <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>(<span class="ruby-identifier">dir</span>.<span class="ruby-identifier">path</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">dir</span>.<span class="ruby-identifier">path</span> @@ -507,11 +547,11 @@ example </div> </div> - <div id="method-M000109" class="method-detail"> - <a name="M000109"></a> + <div id="method-M000120" class="method-detail"> + <a name="M000120"></a> <div class="method-heading"> - <a href="#M000109" class="method-signature"> + <a href="#M000120" class="method-signature"> <span class="method-name">checkout</span><span class="method-args">(branch = 'master', opts = {})</span> </a> </div> @@ -521,10 +561,10 @@ example checks out a branch as the new git working directory </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000109-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000109-source"> + onclick="toggleCode('M000120-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000120-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 246</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 268</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">checkout</span>(<span class="ruby-identifier">branch</span> = <span class="ruby-value str">'master'</span>, <span class="ruby-identifier">opts</span> = {}) <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">checkout</span>(<span class="ruby-identifier">branch</span>, <span class="ruby-identifier">opts</span>) <span class="ruby-keyword kw">end</span> @@ -533,11 +573,34 @@ checks out a branch as the new git working directory </div> </div> - <div id="method-M000107" class="method-detail"> - <a name="M000107"></a> + <div id="method-M000134" class="method-detail"> + <a name="M000134"></a> <div class="method-heading"> - <a href="#M000107" class="method-signature"> + <a href="#M000134" class="method-signature"> + <span class="method-name">checkout_index</span><span class="method-args">(opts = {})</span> + </a> + </div> + + <div class="method-description"> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000134-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000134-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 364</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">checkout_index</span>(<span class="ruby-identifier">opts</span> = {}) + <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">checkout_index</span>(<span class="ruby-identifier">opts</span>) + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000118" class="method-detail"> + <a name="M000118"></a> + + <div class="method-heading"> + <a href="#M000118" class="method-signature"> <span class="method-name">commit</span><span class="method-args">(message, opts = {})</span> </a> </div> @@ -547,10 +610,10 @@ checks out a branch as the new git working directory commits all pending changes in the index file to the git repository </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000107-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000107-source"> + onclick="toggleCode('M000118-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000118-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 233</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 255</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">commit</span>(<span class="ruby-identifier">message</span>, <span class="ruby-identifier">opts</span> = {}) <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">commit</span>(<span class="ruby-identifier">message</span>, <span class="ruby-identifier">opts</span>) <span class="ruby-keyword kw">end</span> @@ -559,11 +622,11 @@ commits all pending changes in the index file to the git repository </div> </div> - <div id="method-M000108" class="method-detail"> - <a name="M000108"></a> + <div id="method-M000119" class="method-detail"> + <a name="M000119"></a> <div class="method-heading"> - <a href="#M000108" class="method-signature"> + <a href="#M000119" class="method-signature"> <span class="method-name">commit_all</span><span class="method-args">(message, opts = {})</span> </a> </div> @@ -575,10 +638,10 @@ automatically adds all modified files without having to explicitly calling @git.add() on them. </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000108-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000108-source"> + onclick="toggleCode('M000119-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000119-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 240</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 262</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">commit_all</span>(<span class="ruby-identifier">message</span>, <span class="ruby-identifier">opts</span> = {}) <span class="ruby-identifier">opts</span> = {<span class="ruby-identifier">:add_all</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">true</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">opts</span>) <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">commit</span>(<span class="ruby-identifier">message</span>, <span class="ruby-identifier">opts</span>) @@ -588,11 +651,34 @@ automatically adds all modified files without having to explicitly calling </div> </div> - <div id="method-M000090" class="method-detail"> - <a name="M000090"></a> + <div id="method-M000137" class="method-detail"> + <a name="M000137"></a> <div class="method-heading"> - <a href="#M000090" class="method-signature"> + <a href="#M000137" class="method-signature"> + <span class="method-name">commit_tree</span><span class="method-args">(tree = nil, opts = {})</span> + </a> + </div> + + <div class="method-description"> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000137-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000137-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 376</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">commit_tree</span>(<span class="ruby-identifier">tree</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">opts</span> = {}) + <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Object</span><span class="ruby-operator">::</span><span class="ruby-constant">Commit</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">commit_tree</span>(<span class="ruby-identifier">tree</span>, <span class="ruby-identifier">opts</span>)) + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000101" class="method-detail"> + <a name="M000101"></a> + + <div class="method-heading"> + <a href="#M000101" class="method-signature"> <span class="method-name">config</span><span class="method-args">(name = nil, value = nil)</span> </a> </div> @@ -605,10 +691,10 @@ value g.config(‘user.name’) # returns ‘Scott Chacon’ g.config # returns whole config hash </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000090-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000090-source"> + onclick="toggleCode('M000101-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000101-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 121</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 134</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">config</span>(<span class="ruby-identifier">name</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">value</span> = <span class="ruby-keyword kw">nil</span>) <span class="ruby-keyword kw">if</span>(<span class="ruby-identifier">name</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">value</span>) <span class="ruby-comment cmt"># set value</span> @@ -626,11 +712,11 @@ Chacon’ g.config # returns whole config hash </div> </div> - <div id="method-M000121" class="method-detail"> - <a name="M000121"></a> + <div id="method-M000144" class="method-detail"> + <a name="M000144"></a> <div class="method-heading"> - <a href="#M000121" class="method-signature"> + <a href="#M000144" class="method-signature"> <span class="method-name">current_branch</span><span class="method-args">()</span> </a> </div> @@ -640,10 +726,10 @@ Chacon’ g.config # returns whole config hash returns the name of the branch the working directory is currently on </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000121-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000121-source"> + onclick="toggleCode('M000144-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000144-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 330</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 425</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_branch</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">branch_current</span> <span class="ruby-keyword kw">end</span> @@ -652,11 +738,11 @@ returns the name of the branch the working directory is currently on </div> </div> - <div id="method-M000102" class="method-detail"> - <a name="M000102"></a> + <div id="method-M000113" class="method-detail"> + <a name="M000113"></a> <div class="method-heading"> - <a href="#M000102" class="method-signature"> + <a href="#M000113" class="method-signature"> <span class="method-name">diff</span><span class="method-args">(objectish = 'HEAD', obj2 = nil)</span> </a> </div> @@ -666,10 +752,10 @@ returns the name of the branch the working directory is currently on returns a <a href="Diff.html">Git::Diff</a> object </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000102-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000102-source"> + onclick="toggleCode('M000113-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000113-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 207</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 229</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">diff</span>(<span class="ruby-identifier">objectish</span> = <span class="ruby-value str">'HEAD'</span>, <span class="ruby-identifier">obj2</span> = <span class="ruby-keyword kw">nil</span>) <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Diff</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">objectish</span>, <span class="ruby-identifier">obj2</span>) <span class="ruby-keyword kw">end</span> @@ -678,11 +764,11 @@ returns a <a href="Diff.html">Git::Diff</a> object </div> </div> - <div id="method-M000085" class="method-detail"> - <a name="M000085"></a> + <div id="method-M000094" class="method-detail"> + <a name="M000094"></a> <div class="method-heading"> - <a href="#M000085" class="method-signature"> + <a href="#M000094" class="method-signature"> <span class="method-name">dir</span><span class="method-args">()</span> </a> </div> @@ -696,10 +782,10 @@ returns a reference to the working directory @git.dir.writeable? </pre> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000085-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000085-source"> + onclick="toggleCode('M000094-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000094-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 78</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 80</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dir</span> <span class="ruby-ivar">@working_directory</span> <span class="ruby-keyword kw">end</span> @@ -708,11 +794,11 @@ returns a reference to the working directory </div> </div> - <div id="method-M000110" class="method-detail"> - <a name="M000110"></a> + <div id="method-M000121" class="method-detail"> + <a name="M000121"></a> <div class="method-heading"> - <a href="#M000110" class="method-signature"> + <a href="#M000121" class="method-signature"> <span class="method-name">fetch</span><span class="method-args">(remote = 'origin')</span> </a> </div> @@ -723,10 +809,10 @@ fetches changes from a remote branch - this does not modify the working directory, it just gets the changes from the remote if there are any </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000110-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000110-source"> + onclick="toggleCode('M000121-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000121-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 252</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 274</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fetch</span>(<span class="ruby-identifier">remote</span> = <span class="ruby-value str">'origin'</span>) <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">fetch</span>(<span class="ruby-identifier">remote</span>) <span class="ruby-keyword kw">end</span> @@ -735,39 +821,57 @@ directory, it just gets the changes from the remote if there are any </div> </div> - <div id="method-M000094" class="method-detail"> - <a name="M000094"></a> + <div id="method-M000105" class="method-detail"> + <a name="M000105"></a> <div class="method-heading"> + <a href="#M000105" class="method-signature"> <span class="method-name">gblob</span><span class="method-args">(objectish)</span> + </a> </div> <div class="method-description"> - <p> -Alias for <a href="Base.html#M000091">object</a> -</p> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000105-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000105-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 169</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">gblob</span>(<span class="ruby-identifier">objectish</span>) + <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Object</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">objectish</span>, <span class="ruby-value str">'blob'</span>) + <span class="ruby-keyword kw">end</span> +</pre> + </div> </div> </div> - <div id="method-M000093" class="method-detail"> - <a name="M000093"></a> + <div id="method-M000104" class="method-detail"> + <a name="M000104"></a> <div class="method-heading"> + <a href="#M000104" class="method-signature"> <span class="method-name">gcommit</span><span class="method-args">(objectish)</span> + </a> </div> <div class="method-description"> - <p> -Alias for <a href="Base.html#M000091">object</a> -</p> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000104-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000104-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 165</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">gcommit</span>(<span class="ruby-identifier">objectish</span>) + <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Object</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">objectish</span>, <span class="ruby-value str">'commit'</span>) + <span class="ruby-keyword kw">end</span> +</pre> + </div> </div> </div> - <div id="method-M000101" class="method-detail"> - <a name="M000101"></a> + <div id="method-M000112" class="method-detail"> + <a name="M000112"></a> <div class="method-heading"> - <a href="#M000101" class="method-signature"> + <a href="#M000112" class="method-signature"> <span class="method-name">grep</span><span class="method-args">(string)</span> </a> </div> @@ -802,10 +906,10 @@ so you might use it like this: end </pre> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000101-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000101-source"> + onclick="toggleCode('M000112-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000112-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 202</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 224</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">grep</span>(<span class="ruby-identifier">string</span>) <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">object</span>(<span class="ruby-value str">'HEAD'</span>).<span class="ruby-identifier">grep</span>(<span class="ruby-identifier">string</span>) <span class="ruby-keyword kw">end</span> @@ -814,25 +918,34 @@ so you might use it like this: </div> </div> - <div id="method-M000092" class="method-detail"> - <a name="M000092"></a> + <div id="method-M000103" class="method-detail"> + <a name="M000103"></a> <div class="method-heading"> + <a href="#M000103" class="method-signature"> <span class="method-name">gtree</span><span class="method-args">(objectish)</span> + </a> </div> <div class="method-description"> - <p> -Alias for <a href="Base.html#M000091">object</a> -</p> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000103-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000103-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 161</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">gtree</span>(<span class="ruby-identifier">objectish</span>) + <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Object</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">objectish</span>, <span class="ruby-value str">'tree'</span>) + <span class="ruby-keyword kw">end</span> +</pre> + </div> </div> </div> - <div id="method-M000087" class="method-detail"> - <a name="M000087"></a> + <div id="method-M000096" class="method-detail"> + <a name="M000096"></a> <div class="method-heading"> - <a href="#M000087" class="method-signature"> + <a href="#M000096" class="method-signature"> <span class="method-name">index</span><span class="method-args">()</span> </a> </div> @@ -842,10 +955,10 @@ Alias for <a href="Base.html#M000091">object</a> returns reference to the git index file </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000087-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000087-source"> + onclick="toggleCode('M000096-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000096-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 89</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 91</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">index</span> <span class="ruby-ivar">@index</span> <span class="ruby-keyword kw">end</span> @@ -854,11 +967,11 @@ returns reference to the git index file </div> </div> - <div id="method-M000100" class="method-detail"> - <a name="M000100"></a> + <div id="method-M000111" class="method-detail"> + <a name="M000111"></a> <div class="method-heading"> - <a href="#M000100" class="method-signature"> + <a href="#M000111" class="method-signature"> <span class="method-name">lib</span><span class="method-args">()</span> </a> </div> @@ -871,23 +984,23 @@ replace the <a href="Lib.html">Git::Lib</a> class with one that uses native methods or libgit C bindings </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000100-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000100-source"> + onclick="toggleCode('M000111-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000111-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 179</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 201</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">lib</span> - <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Lib</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>) + <span class="ruby-ivar">@lib</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Lib</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>) <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> - <div id="method-M000095" class="method-detail"> - <a name="M000095"></a> + <div id="method-M000106" class="method-detail"> + <a name="M000106"></a> <div class="method-heading"> - <a href="#M000095" class="method-signature"> + <a href="#M000106" class="method-signature"> <span class="method-name">log</span><span class="method-args">(count = 30)</span> </a> </div> @@ -897,10 +1010,10 @@ methods or libgit C bindings returns a <a href="Log.html">Git::Log</a> object with count commits </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000095-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000095-source"> + onclick="toggleCode('M000106-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000106-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 152</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 174</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log</span>(<span class="ruby-identifier">count</span> = <span class="ruby-value">30</span>) <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Log</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">count</span>) <span class="ruby-keyword kw">end</span> @@ -909,11 +1022,34 @@ returns a <a href="Log.html">Git::Log</a> object with count commits </div> </div> - <div id="method-M000112" class="method-detail"> - <a name="M000112"></a> + <div id="method-M000140" class="method-detail"> + <a name="M000140"></a> <div class="method-heading"> - <a href="#M000112" class="method-signature"> + <a href="#M000140" class="method-signature"> + <span class="method-name">ls_files</span><span class="method-args">()</span> + </a> + </div> + + <div class="method-description"> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000140-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000140-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 390</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ls_files</span> + <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">ls_files</span> + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000123" class="method-detail"> + <a name="M000123"></a> + + <div class="method-heading"> + <a href="#M000123" class="method-signature"> <span class="method-name">merge</span><span class="method-args">(branch, message = 'merge')</span> </a> </div> @@ -927,10 +1063,10 @@ you can specify more than one branch to merge by passing an array of branches </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000112-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000112-source"> + onclick="toggleCode('M000123-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000123-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 268</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 290</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">merge</span>(<span class="ruby-identifier">branch</span>, <span class="ruby-identifier">message</span> = <span class="ruby-value str">'merge'</span>) <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">branch</span>, <span class="ruby-identifier">message</span>) <span class="ruby-keyword kw">end</span> @@ -939,11 +1075,11 @@ branches </div> </div> - <div id="method-M000091" class="method-detail"> - <a name="M000091"></a> + <div id="method-M000102" class="method-detail"> + <a name="M000102"></a> <div class="method-heading"> - <a href="#M000091" class="method-signature"> + <a href="#M000102" class="method-signature"> <span class="method-name">object</span><span class="method-args">(objectish)</span> </a> </div> @@ -961,10 +1097,10 @@ objectish and determine the type of the object and return an appropriate object for that type </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000091-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000091-source"> + onclick="toggleCode('M000102-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000102-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 144</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 157</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">object</span>(<span class="ruby-identifier">objectish</span>) <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Object</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">objectish</span>) <span class="ruby-keyword kw">end</span> @@ -973,11 +1109,11 @@ object for that type </div> </div> - <div id="method-M000113" class="method-detail"> - <a name="M000113"></a> + <div id="method-M000124" class="method-detail"> + <a name="M000124"></a> <div class="method-heading"> - <a href="#M000113" class="method-signature"> + <a href="#M000124" class="method-signature"> <span class="method-name">pull</span><span class="method-args">(remote = 'origin', branch = 'master', message = 'origin pull')</span> </a> </div> @@ -988,10 +1124,10 @@ fetches a branch from a remote and merges it into the current working branch </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000113-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000113-source"> + onclick="toggleCode('M000124-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000124-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 273</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 295</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pull</span>(<span class="ruby-identifier">remote</span> = <span class="ruby-value str">'origin'</span>, <span class="ruby-identifier">branch</span> = <span class="ruby-value str">'master'</span>, <span class="ruby-identifier">message</span> = <span class="ruby-value str">'origin pull'</span>) <span class="ruby-identifier">fetch</span>(<span class="ruby-identifier">remote</span>) <span class="ruby-identifier">merge</span>(<span class="ruby-identifier">branch</span>, <span class="ruby-identifier">message</span>) @@ -1001,11 +1137,11 @@ branch </div> </div> - <div id="method-M000111" class="method-detail"> - <a name="M000111"></a> + <div id="method-M000122" class="method-detail"> + <a name="M000122"></a> <div class="method-heading"> - <a href="#M000111" class="method-signature"> + <a href="#M000122" class="method-signature"> <span class="method-name">push</span><span class="method-args">(remote = 'origin', branch = 'master')</span> </a> </div> @@ -1020,10 +1156,10 @@ setup the push parameters: @git.config('remote.remote-name.push', 'refs/heads/master:refs/heads/master') </pre> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000111-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000111-source"> + onclick="toggleCode('M000122-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000122-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 261</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 283</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">push</span>(<span class="ruby-identifier">remote</span> = <span class="ruby-value str">'origin'</span>, <span class="ruby-identifier">branch</span> = <span class="ruby-value str">'master'</span>) <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">remote</span>, <span class="ruby-identifier">branch</span>) <span class="ruby-keyword kw">end</span> @@ -1032,11 +1168,34 @@ setup the push parameters: </div> </div> - <div id="method-M000099" class="method-detail"> - <a name="M000099"></a> + <div id="method-M000135" class="method-detail"> + <a name="M000135"></a> <div class="method-heading"> - <a href="#M000099" class="method-signature"> + <a href="#M000135" class="method-signature"> + <span class="method-name">read_tree</span><span class="method-args">(treeish, opts = {})</span> + </a> + </div> + + <div class="method-description"> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000135-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000135-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 368</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_tree</span>(<span class="ruby-identifier">treeish</span>, <span class="ruby-identifier">opts</span> = {}) + <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">read_tree</span>(<span class="ruby-identifier">treeish</span>, <span class="ruby-identifier">opts</span>) + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000110" class="method-detail"> + <a name="M000110"></a> + + <div class="method-heading"> + <a href="#M000110" class="method-signature"> <span class="method-name">remote</span><span class="method-args">(remote_name = 'origin')</span> </a> </div> @@ -1046,10 +1205,10 @@ setup the push parameters: returns a <a href="Remote.html">Git::Remote</a> object </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000099-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000099-source"> + onclick="toggleCode('M000110-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000110-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 172</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 194</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remote</span>(<span class="ruby-identifier">remote_name</span> = <span class="ruby-value str">'origin'</span>) <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Remote</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">remote_name</span>) <span class="ruby-keyword kw">end</span> @@ -1058,11 +1217,11 @@ returns a <a href="Remote.html">Git::Remote</a> object </div> </div> - <div id="method-M000114" class="method-detail"> - <a name="M000114"></a> + <div id="method-M000125" class="method-detail"> + <a name="M000125"></a> <div class="method-heading"> - <a href="#M000114" class="method-signature"> + <a href="#M000125" class="method-signature"> <span class="method-name">remotes</span><span class="method-args">()</span> </a> </div> @@ -1073,10 +1232,10 @@ returns an array of <a href="../Git.html">Git</a>:<a href="Remote.html">Remote</a> objects </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000114-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000114-source"> + onclick="toggleCode('M000125-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000125-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 279</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 301</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remotes</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">remotes</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Remote</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">r</span>) } <span class="ruby-keyword kw">end</span> @@ -1085,11 +1244,11 @@ href="Remote.html">Remote</a> objects </div> </div> - <div id="method-M000104" class="method-detail"> - <a name="M000104"></a> + <div id="method-M000115" class="method-detail"> + <a name="M000115"></a> <div class="method-heading"> - <a href="#M000104" class="method-signature"> + <a href="#M000115" class="method-signature"> <span class="method-name">remove</span><span class="method-args">(path = '.', opts = {})</span> </a> </div> @@ -1099,10 +1258,10 @@ href="Remote.html">Remote</a> objects removes file(s) from the git repository </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000104-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000104-source"> + onclick="toggleCode('M000115-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000115-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 217</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 239</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove</span>(<span class="ruby-identifier">path</span> = <span class="ruby-value str">'.'</span>, <span class="ruby-identifier">opts</span> = {}) <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">remove</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">opts</span>) <span class="ruby-keyword kw">end</span> @@ -1111,11 +1270,11 @@ removes file(s) from the git repository </div> </div> - <div id="method-M000119" class="method-detail"> - <a name="M000119"></a> + <div id="method-M000131" class="method-detail"> + <a name="M000131"></a> <div class="method-heading"> - <a href="#M000119" class="method-signature"> + <a href="#M000131" class="method-signature"> <span class="method-name">repack</span><span class="method-args">()</span> </a> </div> @@ -1125,10 +1284,10 @@ removes file(s) from the git repository repacks the repository </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000119-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000119-source"> + onclick="toggleCode('M000131-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000131-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 315</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 342</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">repack</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">repack</span> <span class="ruby-keyword kw">end</span> @@ -1137,11 +1296,11 @@ repacks the repository </div> </div> - <div id="method-M000086" class="method-detail"> - <a name="M000086"></a> + <div id="method-M000095" class="method-detail"> + <a name="M000095"></a> <div class="method-heading"> - <a href="#M000086" class="method-signature"> + <a href="#M000095" class="method-signature"> <span class="method-name">repo</span><span class="method-args">()</span> </a> </div> @@ -1154,10 +1313,10 @@ returns reference to the git repository directory @git.dir.path </pre> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000086-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000086-source"> + onclick="toggleCode('M000095-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000095-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 84</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 86</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">repo</span> <span class="ruby-ivar">@repository</span> <span class="ruby-keyword kw">end</span> @@ -1166,11 +1325,11 @@ returns reference to the git repository directory </div> </div> - <div id="method-M000089" class="method-detail"> - <a name="M000089"></a> + <div id="method-M000100" class="method-detail"> + <a name="M000100"></a> <div class="method-heading"> - <a href="#M000089" class="method-signature"> + <a href="#M000100" class="method-signature"> <span class="method-name">repo_size</span><span class="method-args">()</span> </a> </div> @@ -1180,10 +1339,10 @@ returns reference to the git repository directory returns the repository size in bytes </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000089-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000089-source"> + onclick="toggleCode('M000100-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000100-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 109</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 122</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">repo_size</span> <span class="ruby-identifier">size</span> = <span class="ruby-value">0</span> <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>(<span class="ruby-identifier">repo</span>.<span class="ruby-identifier">path</span>) <span class="ruby-keyword kw">do</span> @@ -1196,11 +1355,11 @@ returns the repository size in bytes </div> </div> - <div id="method-M000105" class="method-detail"> - <a name="M000105"></a> + <div id="method-M000116" class="method-detail"> + <a name="M000116"></a> <div class="method-heading"> - <a href="#M000105" class="method-signature"> + <a href="#M000116" class="method-signature"> <span class="method-name">reset</span><span class="method-args">(commitish = nil, opts = {})</span> </a> </div> @@ -1210,10 +1369,10 @@ returns the repository size in bytes resets the working directory to the provided commitish </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000105-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000105-source"> + onclick="toggleCode('M000116-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000116-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 222</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 244</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset</span>(<span class="ruby-identifier">commitish</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">opts</span> = {}) <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">reset</span>(<span class="ruby-identifier">commitish</span>, <span class="ruby-identifier">opts</span>) <span class="ruby-keyword kw">end</span> @@ -1222,11 +1381,11 @@ resets the working directory to the provided commitish </div> </div> - <div id="method-M000106" class="method-detail"> - <a name="M000106"></a> + <div id="method-M000117" class="method-detail"> + <a name="M000117"></a> <div class="method-heading"> - <a href="#M000106" class="method-signature"> + <a href="#M000117" class="method-signature"> <span class="method-name">reset_hard</span><span class="method-args">(commitish = nil, opts = {})</span> </a> </div> @@ -1237,10 +1396,10 @@ resets the working directory to the commitish with ’—hard’ </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000106-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000106-source"> + onclick="toggleCode('M000117-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000117-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 227</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 249</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset_hard</span>(<span class="ruby-identifier">commitish</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">opts</span> = {}) <span class="ruby-identifier">opts</span> = {<span class="ruby-identifier">:hard</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">true</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">opts</span>) <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">reset</span>(<span class="ruby-identifier">commitish</span>, <span class="ruby-identifier">opts</span>) @@ -1250,11 +1409,11 @@ resets the working directory to the commitish with </div> </div> - <div id="method-M000120" class="method-detail"> - <a name="M000120"></a> + <div id="method-M000143" class="method-detail"> + <a name="M000143"></a> <div class="method-heading"> - <a href="#M000120" class="method-signature"> + <a href="#M000143" class="method-signature"> <span class="method-name">revparse</span><span class="method-args">(objectish)</span> </a> </div> @@ -1269,10 +1428,10 @@ runs git rev-parse to convert the objectish to a full sha @git.revparse('v2.4:/doc/index.html') </pre> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000120-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000120-source"> + onclick="toggleCode('M000143-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000143-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 325</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 420</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">revparse</span>(<span class="ruby-identifier">objectish</span>) <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">revparse</span>(<span class="ruby-identifier">objectish</span>) <span class="ruby-keyword kw">end</span> @@ -1281,11 +1440,59 @@ runs git rev-parse to convert the objectish to a full sha </div> </div> - <div id="method-M000096" class="method-detail"> - <a name="M000096"></a> + <div id="method-M000098" class="method-detail"> + <a name="M000098"></a> <div class="method-heading"> - <a href="#M000096" class="method-signature"> + <a href="#M000098" class="method-signature"> + <span class="method-name">set_index</span><span class="method-args">(index_file, check = true)</span> + </a> + </div> + + <div class="method-description"> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000098-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000098-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 101</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_index</span>(<span class="ruby-identifier">index_file</span>, <span class="ruby-identifier">check</span> = <span class="ruby-keyword kw">true</span>) + <span class="ruby-ivar">@lib</span> = <span class="ruby-keyword kw">nil</span> + <span class="ruby-ivar">@index</span> = <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Index</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">index_file</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">check</span>) + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000097" class="method-detail"> + <a name="M000097"></a> + + <div class="method-heading"> + <a href="#M000097" class="method-signature"> + <span class="method-name">set_working</span><span class="method-args">(work_dir, check = true)</span> + </a> + </div> + + <div class="method-description"> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000097-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000097-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 96</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_working</span>(<span class="ruby-identifier">work_dir</span>, <span class="ruby-identifier">check</span> = <span class="ruby-keyword kw">true</span>) + <span class="ruby-ivar">@lib</span> = <span class="ruby-keyword kw">nil</span> + <span class="ruby-ivar">@working_directory</span> = <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">WorkingDirectory</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">work_dir</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">check</span>) + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000107" class="method-detail"> + <a name="M000107"></a> + + <div class="method-heading"> + <a href="#M000107" class="method-signature"> <span class="method-name">status</span><span class="method-args">()</span> </a> </div> @@ -1295,10 +1502,10 @@ runs git rev-parse to convert the objectish to a full sha returns a <a href="Status.html">Git::Status</a> object </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000096-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000096-source"> + onclick="toggleCode('M000107-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000107-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 157</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 179</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">status</span> <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Status</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>) <span class="ruby-keyword kw">end</span> @@ -1307,11 +1514,11 @@ returns a <a href="Status.html">Git::Status</a> object </div> </div> - <div id="method-M000117" class="method-detail"> - <a name="M000117"></a> + <div id="method-M000128" class="method-detail"> + <a name="M000128"></a> <div class="method-heading"> - <a href="#M000117" class="method-signature"> + <a href="#M000128" class="method-signature"> <span class="method-name">tag</span><span class="method-args">(tag_name)</span> </a> </div> @@ -1321,23 +1528,23 @@ returns a <a href="Status.html">Git::Status</a> object returns a Git::Tag object </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000117-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000117-source"> + onclick="toggleCode('M000128-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000128-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 304</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 326</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tag</span>(<span class="ruby-identifier">tag_name</span>) - <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Object</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">tag_name</span>, <span class="ruby-keyword kw">true</span>) + <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Object</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">tag_name</span>, <span class="ruby-value str">'tag'</span>, <span class="ruby-keyword kw">true</span>) <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> - <div id="method-M000116" class="method-detail"> - <a name="M000116"></a> + <div id="method-M000127" class="method-detail"> + <a name="M000127"></a> <div class="method-heading"> - <a href="#M000116" class="method-signature"> + <a href="#M000127" class="method-signature"> <span class="method-name">tags</span><span class="method-args">()</span> </a> </div> @@ -1347,10 +1554,10 @@ returns a Git::Tag object returns an array of all Git::Tag objects for this repository </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000116-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000116-source"> + onclick="toggleCode('M000127-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000127-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/base.rb, line 299</span> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 321</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tags</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">tags</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span> <span class="ruby-identifier">tag</span>(<span class="ruby-identifier">r</span>) } <span class="ruby-keyword kw">end</span> @@ -1359,6 +1566,189 @@ returns an array of all Git::Tag objects for this repository </div> </div> + <div id="method-M000139" class="method-detail"> + <a name="M000139"></a> + + <div class="method-heading"> + <a href="#M000139" class="method-signature"> + <span class="method-name">update_ref</span><span class="method-args">(branch, commit)</span> + </a> + </div> + + <div class="method-description"> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000139-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000139-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 385</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_ref</span>(<span class="ruby-identifier">branch</span>, <span class="ruby-identifier">commit</span>) + <span class="ruby-identifier">branch</span>(<span class="ruby-identifier">branch</span>).<span class="ruby-identifier">update_ref</span>(<span class="ruby-identifier">commit</span>) + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000132" class="method-detail"> + <a name="M000132"></a> + + <div class="method-heading"> + <a href="#M000132" class="method-signature"> + <span class="method-name">with_index</span><span class="method-args">(new_index) {|@index| ...}</span> + </a> + </div> + + <div class="method-description"> + <p> +LOWER LEVEL INDEX OPERATIONS ## +</p> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000132-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000132-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 349</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">with_index</span>(<span class="ruby-identifier">new_index</span>) + <span class="ruby-identifier">old_index</span> = <span class="ruby-ivar">@index</span> + <span class="ruby-identifier">set_index</span>(<span class="ruby-identifier">new_index</span>, <span class="ruby-keyword kw">false</span>) + <span class="ruby-identifier">return_value</span> = <span class="ruby-keyword kw">yield</span> <span class="ruby-ivar">@index</span> + <span class="ruby-identifier">set_index</span>(<span class="ruby-identifier">old_index</span>) + <span class="ruby-identifier">return_value</span> + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000133" class="method-detail"> + <a name="M000133"></a> + + <div class="method-heading"> + <a href="#M000133" class="method-signature"> + <span class="method-name">with_temp_index</span><span class="method-args">(&blk)</span> + </a> + </div> + + <div class="method-description"> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000133-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000133-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 357</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">with_temp_index</span> <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span> + <span class="ruby-identifier">tempfile</span> = <span class="ruby-constant">Tempfile</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'temp-index'</span>) + <span class="ruby-identifier">temp_path</span> = <span class="ruby-identifier">tempfile</span>.<span class="ruby-identifier">path</span> + <span class="ruby-identifier">tempfile</span>.<span class="ruby-identifier">unlink</span> + <span class="ruby-identifier">with_index</span>(<span class="ruby-identifier">temp_path</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>) + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000142" class="method-detail"> + <a name="M000142"></a> + + <div class="method-heading"> + <a href="#M000142" class="method-signature"> + <span class="method-name">with_temp_working</span><span class="method-args">(&blk)</span> + </a> + </div> + + <div class="method-description"> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000142-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000142-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 405</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">with_temp_working</span> <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span> + <span class="ruby-identifier">tempfile</span> = <span class="ruby-constant">Tempfile</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"temp-workdir"</span>) + <span class="ruby-identifier">temp_dir</span> = <span class="ruby-identifier">tempfile</span>.<span class="ruby-identifier">path</span> + <span class="ruby-identifier">tempfile</span>.<span class="ruby-identifier">unlink</span> + <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">mkdir</span>(<span class="ruby-identifier">temp_dir</span>, <span class="ruby-value">0700</span>) + <span class="ruby-identifier">with_working</span>(<span class="ruby-identifier">temp_dir</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>) + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000141" class="method-detail"> + <a name="M000141"></a> + + <div class="method-heading"> + <a href="#M000141" class="method-signature"> + <span class="method-name">with_working</span><span class="method-args">(work_dir) {|@working_directory| ...}</span> + </a> + </div> + + <div class="method-description"> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000141-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000141-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 394</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">with_working</span>(<span class="ruby-identifier">work_dir</span>) + <span class="ruby-identifier">return_value</span> = <span class="ruby-keyword kw">false</span> + <span class="ruby-identifier">old_working</span> = <span class="ruby-ivar">@working_directory</span> + <span class="ruby-identifier">set_working</span>(<span class="ruby-identifier">work_dir</span>) + <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span> <span class="ruby-identifier">work_dir</span> <span class="ruby-keyword kw">do</span> + <span class="ruby-identifier">return_value</span> = <span class="ruby-keyword kw">yield</span> <span class="ruby-ivar">@working_directory</span> + <span class="ruby-keyword kw">end</span> + <span class="ruby-identifier">set_working</span>(<span class="ruby-identifier">old_working</span>) + <span class="ruby-identifier">return_value</span> + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000138" class="method-detail"> + <a name="M000138"></a> + + <div class="method-heading"> + <a href="#M000138" class="method-signature"> + <span class="method-name">write_and_commit_tree</span><span class="method-args">(opts = {})</span> + </a> + </div> + + <div class="method-description"> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000138-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000138-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 380</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write_and_commit_tree</span>(<span class="ruby-identifier">opts</span> = {}) + <span class="ruby-identifier">tree</span> = <span class="ruby-identifier">write_tree</span> + <span class="ruby-identifier">commit_tree</span>(<span class="ruby-identifier">tree</span>, <span class="ruby-identifier">opts</span>) + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000136" class="method-detail"> + <a name="M000136"></a> + + <div class="method-heading"> + <a href="#M000136" class="method-signature"> + <span class="method-name">write_tree</span><span class="method-args">()</span> + </a> + </div> + + <div class="method-description"> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000136-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000136-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/base.rb, line 372</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write_tree</span> + <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">write_tree</span> + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + </div> diff --git a/doc/classes/Git/Branch.html b/doc/classes/Git/Branch.html index 9b392fd..953f7ae 100644 --- a/doc/classes/Git/Branch.html +++ b/doc/classes/Git/Branch.html @@ -88,16 +88,18 @@ <h3 class="section-bar">Methods</h3> <div class="name-list"> - <a href="#M000072">checkout</a> - <a href="#M000074">create</a> - <a href="#M000076">current</a> - <a href="#M000075">delete</a> - <a href="#M000071">gcommit</a> - <a href="#M000073">in_branch</a> - <a href="#M000077">merge</a> - <a href="#M000070">new</a> - <a href="#M000078">to_a</a> - <a href="#M000079">to_s</a> + <a href="#M000080">archive</a> + <a href="#M000079">checkout</a> + <a href="#M000082">create</a> + <a href="#M000084">current</a> + <a href="#M000083">delete</a> + <a href="#M000078">gcommit</a> + <a href="#M000081">in_branch</a> + <a href="#M000085">merge</a> + <a href="#M000077">new</a> + <a href="#M000087">to_a</a> + <a href="#M000088">to_s</a> + <a href="#M000086">update_ref</a> </div> </div> @@ -142,19 +144,19 @@ <div id="methods"> <h3 class="section-bar">Public Class methods</h3> - <div id="method-M000070" class="method-detail"> - <a name="M000070"></a> + <div id="method-M000077" class="method-detail"> + <a name="M000077"></a> <div class="method-heading"> - <a href="#M000070" class="method-signature"> + <a href="#M000077" class="method-signature"> <span class="method-name">new</span><span class="method-args">(base, name)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000070-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000070-source"> + onclick="toggleCode('M000077-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000077-source"> <pre> <span class="ruby-comment cmt"># File lib/git/branch.rb, line 9</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">base</span>, <span class="ruby-identifier">name</span>) @@ -177,45 +179,68 @@ <h3 class="section-bar">Public Instance methods</h3> - <div id="method-M000072" class="method-detail"> - <a name="M000072"></a> + <div id="method-M000080" class="method-detail"> + <a name="M000080"></a> <div class="method-heading"> - <a href="#M000072" class="method-signature"> + <a href="#M000080" class="method-signature"> + <span class="method-name">archive</span><span class="method-args">(file, opts = {})</span> + </a> + </div> + + <div class="method-description"> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000080-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000080-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/branch.rb, line 33</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">archive</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">opts</span> = {}) + <span class="ruby-ivar">@base</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">archive</span>(<span class="ruby-ivar">@full</span>, <span class="ruby-identifier">file</span>, <span class="ruby-identifier">opts</span>) + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000079" class="method-detail"> + <a name="M000079"></a> + + <div class="method-heading"> + <a href="#M000079" class="method-signature"> <span class="method-name">checkout</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000072-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000072-source"> + onclick="toggleCode('M000079-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000079-source"> <pre> <span class="ruby-comment cmt"># File lib/git/branch.rb, line 28</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">checkout</span> <span class="ruby-identifier">check_if_create</span> - <span class="ruby-ivar">@base</span>.<span class="ruby-identifier">checkout</span>(<span class="ruby-ivar">@name</span>) + <span class="ruby-ivar">@base</span>.<span class="ruby-identifier">checkout</span>(<span class="ruby-ivar">@full</span>) <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> - <div id="method-M000074" class="method-detail"> - <a name="M000074"></a> + <div id="method-M000082" class="method-detail"> + <a name="M000082"></a> <div class="method-heading"> - <a href="#M000074" class="method-signature"> + <a href="#M000082" class="method-signature"> <span class="method-name">create</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000074-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000074-source"> + onclick="toggleCode('M000082-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000082-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/branch.rb, line 50</span> +<span class="ruby-comment cmt"># File lib/git/branch.rb, line 53</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create</span> <span class="ruby-identifier">check_if_create</span> <span class="ruby-keyword kw">end</span> @@ -224,21 +249,21 @@ </div> </div> - <div id="method-M000076" class="method-detail"> - <a name="M000076"></a> + <div id="method-M000084" class="method-detail"> + <a name="M000084"></a> <div class="method-heading"> - <a href="#M000076" class="method-signature"> + <a href="#M000084" class="method-signature"> <span class="method-name">current</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000076-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000076-source"> + onclick="toggleCode('M000084-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000084-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/branch.rb, line 58</span> +<span class="ruby-comment cmt"># File lib/git/branch.rb, line 61</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current</span> <span class="ruby-identifier">determine_current</span> <span class="ruby-keyword kw">end</span> @@ -247,21 +272,21 @@ </div> </div> - <div id="method-M000075" class="method-detail"> - <a name="M000075"></a> + <div id="method-M000083" class="method-detail"> + <a name="M000083"></a> <div class="method-heading"> - <a href="#M000075" class="method-signature"> + <a href="#M000083" class="method-signature"> <span class="method-name">delete</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000075-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000075-source"> + onclick="toggleCode('M000083-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000083-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/branch.rb, line 54</span> +<span class="ruby-comment cmt"># File lib/git/branch.rb, line 57</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span> <span class="ruby-ivar">@base</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">branch_delete</span>(<span class="ruby-ivar">@name</span>) <span class="ruby-keyword kw">end</span> @@ -270,23 +295,23 @@ </div> </div> - <div id="method-M000071" class="method-detail"> - <a name="M000071"></a> + <div id="method-M000078" class="method-detail"> + <a name="M000078"></a> <div class="method-heading"> - <a href="#M000071" class="method-signature"> + <a href="#M000078" class="method-signature"> <span class="method-name">gcommit</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000071-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000071-source"> + onclick="toggleCode('M000078-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000078-source"> <pre> <span class="ruby-comment cmt"># File lib/git/branch.rb, line 23</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">gcommit</span> - <span class="ruby-ivar">@gcommit</span> = <span class="ruby-ivar">@base</span>.<span class="ruby-identifier">object</span>(<span class="ruby-identifier">name</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@gcommit</span> + <span class="ruby-ivar">@gcommit</span> = <span class="ruby-ivar">@base</span>.<span class="ruby-identifier">object</span>(<span class="ruby-ivar">@full</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@gcommit</span> <span class="ruby-ivar">@gcommit</span> <span class="ruby-keyword kw">end</span> </pre> @@ -294,11 +319,11 @@ </div> </div> - <div id="method-M000073" class="method-detail"> - <a name="M000073"></a> + <div id="method-M000081" class="method-detail"> + <a name="M000081"></a> <div class="method-heading"> - <a href="#M000073" class="method-signature"> + <a href="#M000081" class="method-signature"> <span class="method-name">in_branch</span><span class="method-args">(message = 'in branch work') {|| ...}</span> </a> </div> @@ -306,7 +331,7 @@ <div class="method-description"> <p> g.branch(‘new_branch’).<a -href="Branch.html#M000073">in_branch</a> do +href="Branch.html#M000081">in_branch</a> do </p> <pre> # create new file @@ -317,10 +342,10 @@ href="Branch.html#M000073">in_branch</a> do end </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000073-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000073-source"> + onclick="toggleCode('M000081-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000081-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/branch.rb, line 39</span> +<span class="ruby-comment cmt"># File lib/git/branch.rb, line 42</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">in_branch</span> (<span class="ruby-identifier">message</span> = <span class="ruby-value str">'in branch work'</span>) <span class="ruby-identifier">old_current</span> = <span class="ruby-ivar">@base</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">branch_current</span> <span class="ruby-identifier">checkout</span> @@ -336,21 +361,21 @@ end </div> </div> - <div id="method-M000077" class="method-detail"> - <a name="M000077"></a> + <div id="method-M000085" class="method-detail"> + <a name="M000085"></a> <div class="method-heading"> - <a href="#M000077" class="method-signature"> + <a href="#M000085" class="method-signature"> <span class="method-name">merge</span><span class="method-args">(branch = nil, message = nil)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000077-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000077-source"> + onclick="toggleCode('M000085-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000085-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/branch.rb, line 62</span> +<span class="ruby-comment cmt"># File lib/git/branch.rb, line 65</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">merge</span>(<span class="ruby-identifier">branch</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">message</span> = <span class="ruby-keyword kw">nil</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">branch</span> <span class="ruby-identifier">in_branch</span> <span class="ruby-keyword kw">do</span> @@ -368,21 +393,21 @@ end </div> </div> - <div id="method-M000078" class="method-detail"> - <a name="M000078"></a> + <div id="method-M000087" class="method-detail"> + <a name="M000087"></a> <div class="method-heading"> - <a href="#M000078" class="method-signature"> + <a href="#M000087" class="method-signature"> <span class="method-name">to_a</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000078-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000078-source"> + onclick="toggleCode('M000087-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000087-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/branch.rb, line 75</span> +<span class="ruby-comment cmt"># File lib/git/branch.rb, line 82</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_a</span> [<span class="ruby-ivar">@full</span>] <span class="ruby-keyword kw">end</span> @@ -391,21 +416,21 @@ end </div> </div> - <div id="method-M000079" class="method-detail"> - <a name="M000079"></a> + <div id="method-M000088" class="method-detail"> + <a name="M000088"></a> <div class="method-heading"> - <a href="#M000079" class="method-signature"> + <a href="#M000088" class="method-signature"> <span class="method-name">to_s</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000079-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000079-source"> + onclick="toggleCode('M000088-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000088-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/branch.rb, line 79</span> +<span class="ruby-comment cmt"># File lib/git/branch.rb, line 86</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span> <span class="ruby-ivar">@full</span> <span class="ruby-keyword kw">end</span> @@ -414,6 +439,29 @@ end </div> </div> + <div id="method-M000086" class="method-detail"> + <a name="M000086"></a> + + <div class="method-heading"> + <a href="#M000086" class="method-signature"> + <span class="method-name">update_ref</span><span class="method-args">(commit)</span> + </a> + </div> + + <div class="method-description"> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000086-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000086-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/branch.rb, line 78</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_ref</span>(<span class="ruby-identifier">commit</span>) + <span class="ruby-ivar">@base</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">update_ref</span>(<span class="ruby-ivar">@full</span>, <span class="ruby-identifier">commit</span>) + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + </div> diff --git a/doc/classes/Git/Branches.html b/doc/classes/Git/Branches.html index e812dd6..994ec65 100644 --- a/doc/classes/Git/Branches.html +++ b/doc/classes/Git/Branches.html @@ -94,12 +94,12 @@ object that holds all the available branches <h3 class="section-bar">Methods</h3> <div class="name-list"> - <a href="#M000069">[]</a> - <a href="#M000068">each</a> - <a href="#M000065">local</a> - <a href="#M000064">new</a> - <a href="#M000066">remote</a> - <a href="#M000067">size</a> + <a href="#M000076">[]</a> + <a href="#M000075">each</a> + <a href="#M000072">local</a> + <a href="#M000071">new</a> + <a href="#M000073">remote</a> + <a href="#M000074">size</a> </div> </div> @@ -128,19 +128,19 @@ object that holds all the available branches <div id="methods"> <h3 class="section-bar">Public Class methods</h3> - <div id="method-M000064" class="method-detail"> - <a name="M000064"></a> + <div id="method-M000071" class="method-detail"> + <a name="M000071"></a> <div class="method-heading"> - <a href="#M000064" class="method-signature"> + <a href="#M000071" class="method-signature"> <span class="method-name">new</span><span class="method-args">(base)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000064-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000064-source"> + onclick="toggleCode('M000071-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000071-source"> <pre> <span class="ruby-comment cmt"># File lib/git/branches.rb, line 10</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">base</span>) @@ -159,19 +159,19 @@ object that holds all the available branches <h3 class="section-bar">Public Instance methods</h3> - <div id="method-M000069" class="method-detail"> - <a name="M000069"></a> + <div id="method-M000076" class="method-detail"> + <a name="M000076"></a> <div class="method-heading"> - <a href="#M000069" class="method-signature"> + <a href="#M000076" class="method-signature"> <span class="method-name">[]</span><span class="method-args">(symbol)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000069-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000069-source"> + onclick="toggleCode('M000076-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000076-source"> <pre> <span class="ruby-comment cmt"># File lib/git/branches.rb, line 40</span> <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-identifier">symbol</span>) @@ -182,19 +182,19 @@ object that holds all the available branches </div> </div> - <div id="method-M000068" class="method-detail"> - <a name="M000068"></a> + <div id="method-M000075" class="method-detail"> + <a name="M000075"></a> <div class="method-heading"> - <a href="#M000068" class="method-signature"> + <a href="#M000075" class="method-signature"> <span class="method-name">each</span><span class="method-args">() {|b| ...}</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000068-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000068-source"> + onclick="toggleCode('M000075-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000075-source"> <pre> <span class="ruby-comment cmt"># File lib/git/branches.rb, line 34</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each</span> @@ -207,19 +207,19 @@ object that holds all the available branches </div> </div> - <div id="method-M000065" class="method-detail"> - <a name="M000065"></a> + <div id="method-M000072" class="method-detail"> + <a name="M000072"></a> <div class="method-heading"> - <a href="#M000065" class="method-signature"> + <a href="#M000072" class="method-signature"> <span class="method-name">local</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000065-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000065-source"> + onclick="toggleCode('M000072-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000072-source"> <pre> <span class="ruby-comment cmt"># File lib/git/branches.rb, line 20</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">local</span> @@ -230,19 +230,19 @@ object that holds all the available branches </div> </div> - <div id="method-M000066" class="method-detail"> - <a name="M000066"></a> + <div id="method-M000073" class="method-detail"> + <a name="M000073"></a> <div class="method-heading"> - <a href="#M000066" class="method-signature"> + <a href="#M000073" class="method-signature"> <span class="method-name">remote</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000066-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000066-source"> + onclick="toggleCode('M000073-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000073-source"> <pre> <span class="ruby-comment cmt"># File lib/git/branches.rb, line 24</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remote</span> @@ -253,11 +253,11 @@ object that holds all the available branches </div> </div> - <div id="method-M000067" class="method-detail"> - <a name="M000067"></a> + <div id="method-M000074" class="method-detail"> + <a name="M000074"></a> <div class="method-heading"> - <a href="#M000067" class="method-signature"> + <a href="#M000074" class="method-signature"> <span class="method-name">size</span><span class="method-args">()</span> </a> </div> @@ -267,8 +267,8 @@ object that holds all the available branches array like methods </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000067-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000067-source"> + onclick="toggleCode('M000074-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000074-source"> <pre> <span class="ruby-comment cmt"># File lib/git/branches.rb, line 30</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">size</span> diff --git a/doc/classes/Git/Diff.html b/doc/classes/Git/Diff.html index 63ebee2..21cb953 100644 --- a/doc/classes/Git/Diff.html +++ b/doc/classes/Git/Diff.html @@ -94,17 +94,17 @@ object that holds the last X commits on given branch <h3 class="section-bar">Methods</h3> <div class="name-list"> - <a href="#M000162">[]</a> - <a href="#M000157">deletions</a> - <a href="#M000163">each</a> - <a href="#M000158">insertions</a> - <a href="#M000156">lines</a> - <a href="#M000153">new</a> - <a href="#M000160">patch</a> - <a href="#M000154">path</a> - <a href="#M000155">size</a> - <a href="#M000159">stats</a> - <a href="#M000161">to_s</a> + <a href="#M000194">[]</a> + <a href="#M000189">deletions</a> + <a href="#M000195">each</a> + <a href="#M000190">insertions</a> + <a href="#M000188">lines</a> + <a href="#M000185">new</a> + <a href="#M000192">patch</a> + <a href="#M000186">path</a> + <a href="#M000187">size</a> + <a href="#M000191">stats</a> + <a href="#M000193">to_s</a> </div> </div> @@ -139,19 +139,19 @@ object that holds the last X commits on given branch <div id="methods"> <h3 class="section-bar">Public Class methods</h3> - <div id="method-M000153" class="method-detail"> - <a name="M000153"></a> + <div id="method-M000185" class="method-detail"> + <a name="M000185"></a> <div class="method-heading"> - <a href="#M000153" class="method-signature"> + <a href="#M000185" class="method-signature"> <span class="method-name">new</span><span class="method-args">(base, from = nil, to = nil)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000153-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000153-source"> + onclick="toggleCode('M000185-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000185-source"> <pre> <span class="ruby-comment cmt"># File lib/git/diff.rb, line 16</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">base</span>, <span class="ruby-identifier">from</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">to</span> = <span class="ruby-keyword kw">nil</span>) @@ -166,11 +166,11 @@ object that holds the last X commits on given branch <h3 class="section-bar">Public Instance methods</h3> - <div id="method-M000162" class="method-detail"> - <a name="M000162"></a> + <div id="method-M000194" class="method-detail"> + <a name="M000194"></a> <div class="method-heading"> - <a href="#M000162" class="method-signature"> + <a href="#M000194" class="method-signature"> <span class="method-name">[]</span><span class="method-args">(key)</span> </a> </div> @@ -180,8 +180,8 @@ object that holds the last X commits on given branch enumerable methods </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000162-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000162-source"> + onclick="toggleCode('M000194-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000194-source"> <pre> <span class="ruby-comment cmt"># File lib/git/diff.rb, line 61</span> <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-identifier">key</span>) @@ -193,19 +193,19 @@ enumerable methods </div> </div> - <div id="method-M000157" class="method-detail"> - <a name="M000157"></a> + <div id="method-M000189" class="method-detail"> + <a name="M000189"></a> <div class="method-heading"> - <a href="#M000157" class="method-signature"> + <a href="#M000189" class="method-signature"> <span class="method-name">deletions</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000157-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000157-source"> + onclick="toggleCode('M000189-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000189-source"> <pre> <span class="ruby-comment cmt"># File lib/git/diff.rb, line 37</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">deletions</span> @@ -217,19 +217,19 @@ enumerable methods </div> </div> - <div id="method-M000163" class="method-detail"> - <a name="M000163"></a> + <div id="method-M000195" class="method-detail"> + <a name="M000195"></a> <div class="method-heading"> - <a href="#M000163" class="method-signature"> + <a href="#M000195" class="method-signature"> <span class="method-name">each</span><span class="method-args">() {|file[1]| ...}</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000163-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000163-source"> + onclick="toggleCode('M000195-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000195-source"> <pre> <span class="ruby-comment cmt"># File lib/git/diff.rb, line 66</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each</span> @@ -243,19 +243,19 @@ enumerable methods </div> </div> - <div id="method-M000158" class="method-detail"> - <a name="M000158"></a> + <div id="method-M000190" class="method-detail"> + <a name="M000190"></a> <div class="method-heading"> - <a href="#M000158" class="method-signature"> + <a href="#M000190" class="method-signature"> <span class="method-name">insertions</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000158-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000158-source"> + onclick="toggleCode('M000190-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000190-source"> <pre> <span class="ruby-comment cmt"># File lib/git/diff.rb, line 42</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">insertions</span> @@ -267,19 +267,19 @@ enumerable methods </div> </div> - <div id="method-M000156" class="method-detail"> - <a name="M000156"></a> + <div id="method-M000188" class="method-detail"> + <a name="M000188"></a> <div class="method-heading"> - <a href="#M000156" class="method-signature"> + <a href="#M000188" class="method-signature"> <span class="method-name">lines</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000156-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000156-source"> + onclick="toggleCode('M000188-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000188-source"> <pre> <span class="ruby-comment cmt"># File lib/git/diff.rb, line 32</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">lines</span> @@ -291,11 +291,11 @@ enumerable methods </div> </div> - <div id="method-M000160" class="method-detail"> - <a name="M000160"></a> + <div id="method-M000192" class="method-detail"> + <a name="M000192"></a> <div class="method-heading"> - <a href="#M000160" class="method-signature"> + <a href="#M000192" class="method-signature"> <span class="method-name">patch</span><span class="method-args">(file = nil)</span> </a> </div> @@ -305,8 +305,8 @@ enumerable methods if file is provided and is writable, it will write the patch into the file </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000160-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000160-source"> + onclick="toggleCode('M000192-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000192-source"> <pre> <span class="ruby-comment cmt"># File lib/git/diff.rb, line 53</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">patch</span>(<span class="ruby-identifier">file</span> = <span class="ruby-keyword kw">nil</span>) @@ -318,19 +318,19 @@ if file is provided and is writable, it will write the patch into the file </div> </div> - <div id="method-M000154" class="method-detail"> - <a name="M000154"></a> + <div id="method-M000186" class="method-detail"> + <a name="M000186"></a> <div class="method-heading"> - <a href="#M000154" class="method-signature"> + <a href="#M000186" class="method-signature"> <span class="method-name">path</span><span class="method-args">(path)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000154-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000154-source"> + onclick="toggleCode('M000186-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000186-source"> <pre> <span class="ruby-comment cmt"># File lib/git/diff.rb, line 22</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">path</span>(<span class="ruby-identifier">path</span>) @@ -342,19 +342,19 @@ if file is provided and is writable, it will write the patch into the file </div> </div> - <div id="method-M000155" class="method-detail"> - <a name="M000155"></a> + <div id="method-M000187" class="method-detail"> + <a name="M000187"></a> <div class="method-heading"> - <a href="#M000155" class="method-signature"> + <a href="#M000187" class="method-signature"> <span class="method-name">size</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000155-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000155-source"> + onclick="toggleCode('M000187-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000187-source"> <pre> <span class="ruby-comment cmt"># File lib/git/diff.rb, line 27</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">size</span> @@ -366,19 +366,19 @@ if file is provided and is writable, it will write the patch into the file </div> </div> - <div id="method-M000159" class="method-detail"> - <a name="M000159"></a> + <div id="method-M000191" class="method-detail"> + <a name="M000191"></a> <div class="method-heading"> - <a href="#M000159" class="method-signature"> + <a href="#M000191" class="method-signature"> <span class="method-name">stats</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000159-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000159-source"> + onclick="toggleCode('M000191-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000191-source"> <pre> <span class="ruby-comment cmt"># File lib/git/diff.rb, line 47</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stats</span> @@ -390,8 +390,8 @@ if file is provided and is writable, it will write the patch into the file </div> </div> - <div id="method-M000161" class="method-detail"> - <a name="M000161"></a> + <div id="method-M000193" class="method-detail"> + <a name="M000193"></a> <div class="method-heading"> <span class="method-name">to_s</span><span class="method-args">(file = nil)</span> @@ -399,7 +399,7 @@ if file is provided and is writable, it will write the patch into the file <div class="method-description"> <p> -Alias for <a href="Diff.html#M000160">patch</a> +Alias for <a href="Diff.html#M000192">patch</a> </p> </div> </div> diff --git a/doc/classes/Git/Diff/DiffFile.html b/doc/classes/Git/Diff/DiffFile.html index 39139e5..5e9c752 100644 --- a/doc/classes/Git/Diff/DiffFile.html +++ b/doc/classes/Git/Diff/DiffFile.html @@ -86,8 +86,8 @@ <h3 class="section-bar">Methods</h3> <div class="name-list"> - <a href="#M000165">blob</a> - <a href="#M000164">new</a> + <a href="#M000197">blob</a> + <a href="#M000196">new</a> </div> </div> @@ -147,19 +147,19 @@ <div id="methods"> <h3 class="section-bar">Public Class methods</h3> - <div id="method-M000164" class="method-detail"> - <a name="M000164"></a> + <div id="method-M000196" class="method-detail"> + <a name="M000196"></a> <div class="method-heading"> - <a href="#M000164" class="method-signature"> + <a href="#M000196" class="method-signature"> <span class="method-name">new</span><span class="method-args">(base, hash)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000164-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000164-source"> + onclick="toggleCode('M000196-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000196-source"> <pre> <span class="ruby-comment cmt"># File lib/git/diff.rb, line 77</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">base</span>, <span class="ruby-identifier">hash</span>) @@ -178,19 +178,19 @@ <h3 class="section-bar">Public Instance methods</h3> - <div id="method-M000165" class="method-detail"> - <a name="M000165"></a> + <div id="method-M000197" class="method-detail"> + <a name="M000197"></a> <div class="method-heading"> - <a href="#M000165" class="method-signature"> + <a href="#M000197" class="method-signature"> <span class="method-name">blob</span><span class="method-args">(type = :dst)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000165-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000165-source"> + onclick="toggleCode('M000197-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000197-source"> <pre> <span class="ruby-comment cmt"># File lib/git/diff.rb, line 87</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">blob</span>(<span class="ruby-identifier">type</span> = <span class="ruby-identifier">:dst</span>) diff --git a/doc/classes/Git/Lib.html b/doc/classes/Git/Lib.html index 9c4992e..5875189 100644 --- a/doc/classes/Git/Lib.html +++ b/doc/classes/Git/Lib.html @@ -88,45 +88,52 @@ <h3 class="section-bar">Methods</h3> <div class="name-list"> - <a href="#M000047">add</a> - <a href="#M000036">branch_current</a> - <a href="#M000052">branch_delete</a> - <a href="#M000051">branch_new</a> - <a href="#M000035">branches_all</a> - <a href="#M000053">checkout</a> + <a href="#M000048">add</a> + <a href="#M000070">archive</a> + <a href="#M000037">branch_current</a> + <a href="#M000053">branch_delete</a> + <a href="#M000052">branch_new</a> + <a href="#M000036">branches_all</a> + <a href="#M000054">checkout</a> + <a href="#M000069">checkout_index</a> <a href="#M000027">clone</a> - <a href="#M000049">commit</a> - <a href="#M000032">commit_data</a> - <a href="#M000044">config_get</a> - <a href="#M000045">config_list</a> - <a href="#M000043">config_remote</a> - <a href="#M000046">config_set</a> - <a href="#M000040">diff_files</a> - <a href="#M000038">diff_full</a> - <a href="#M000041">diff_index</a> - <a href="#M000039">diff_stats</a> - <a href="#M000060">fetch</a> - <a href="#M000037">grep</a> + <a href="#M000050">commit</a> + <a href="#M000033">commit_data</a> + <a href="#M000067">commit_tree</a> + <a href="#M000045">config_get</a> + <a href="#M000046">config_list</a> + <a href="#M000044">config_remote</a> + <a href="#M000047">config_set</a> + <a href="#M000041">diff_files</a> + <a href="#M000039">diff_full</a> + <a href="#M000042">diff_index</a> + <a href="#M000040">diff_stats</a> + <a href="#M000061">fetch</a> + <a href="#M000038">grep</a> <a href="#M000026">init</a> <a href="#M000028">log_commits</a> - <a href="#M000042">ls_files</a> - <a href="#M000034">ls_tree</a> - <a href="#M000054">merge</a> + <a href="#M000043">ls_files</a> + <a href="#M000035">ls_tree</a> + <a href="#M000055">merge</a> + <a href="#M000030">namerev</a> <a href="#M000025">new</a> - <a href="#M000033">object_contents</a> - <a href="#M000031">object_size</a> - <a href="#M000030">object_type</a> - <a href="#M000061">push</a> - <a href="#M000055">remote_add</a> - <a href="#M000056">remote_remove</a> - <a href="#M000057">remotes</a> - <a href="#M000048">remove</a> - <a href="#M000063">repack</a> - <a href="#M000050">reset</a> + <a href="#M000034">object_contents</a> + <a href="#M000032">object_size</a> + <a href="#M000031">object_type</a> + <a href="#M000062">push</a> + <a href="#M000065">read_tree</a> + <a href="#M000056">remote_add</a> + <a href="#M000057">remote_remove</a> + <a href="#M000058">remotes</a> + <a href="#M000049">remove</a> + <a href="#M000064">repack</a> + <a href="#M000051">reset</a> <a href="#M000029">revparse</a> - <a href="#M000059">tag</a> - <a href="#M000062">tag_sha</a> - <a href="#M000058">tags</a> + <a href="#M000060">tag</a> + <a href="#M000063">tag_sha</a> + <a href="#M000059">tags</a> + <a href="#M000068">update_ref</a> + <a href="#M000066">write_tree</a> </div> </div> @@ -162,12 +169,12 @@ onclick="toggleCode('M000025-source');return false;">[Source]</a></p> <div class="method-source-code" id="M000025-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 13</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 15</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">base</span> = <span class="ruby-keyword kw">nil</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">base</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>) <span class="ruby-ivar">@git_dir</span> = <span class="ruby-identifier">base</span>.<span class="ruby-identifier">repo</span>.<span class="ruby-identifier">path</span> - <span class="ruby-ivar">@git_index_file</span> = <span class="ruby-identifier">base</span>.<span class="ruby-identifier">index</span>.<span class="ruby-identifier">path</span> - <span class="ruby-ivar">@git_work_dir</span> = <span class="ruby-identifier">base</span>.<span class="ruby-identifier">dir</span>.<span class="ruby-identifier">path</span> + <span class="ruby-ivar">@git_index_file</span> = <span class="ruby-identifier">base</span>.<span class="ruby-identifier">index</span>.<span class="ruby-identifier">path</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">base</span>.<span class="ruby-identifier">index</span> + <span class="ruby-ivar">@git_work_dir</span> = <span class="ruby-identifier">base</span>.<span class="ruby-identifier">dir</span>.<span class="ruby-identifier">path</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">base</span>.<span class="ruby-identifier">dir</span> <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">base</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>) <span class="ruby-ivar">@git_dir</span> = <span class="ruby-identifier">base</span>[<span class="ruby-identifier">:repository</span>] <span class="ruby-ivar">@git_index_file</span> = <span class="ruby-identifier">base</span>[<span class="ruby-identifier">:index</span>] @@ -181,21 +188,21 @@ <h3 class="section-bar">Public Instance methods</h3> - <div id="method-M000047" class="method-detail"> - <a name="M000047"></a> + <div id="method-M000048" class="method-detail"> + <a name="M000048"></a> <div class="method-heading"> - <a href="#M000047" class="method-signature"> + <a href="#M000048" class="method-signature"> <span class="method-name">add</span><span class="method-args">(path = '.')</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000047-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000047-source"> + onclick="toggleCode('M000048-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000048-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 251</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 257</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add</span>(<span class="ruby-identifier">path</span> = <span class="ruby-value str">'.'</span>) <span class="ruby-identifier">path</span> = <span class="ruby-identifier">path</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">path</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>) <span class="ruby-identifier">command</span>(<span class="ruby-value str">'add'</span>, <span class="ruby-identifier">path</span>) @@ -205,21 +212,76 @@ </div> </div> - <div id="method-M000036" class="method-detail"> - <a name="M000036"></a> + <div id="method-M000070" class="method-detail"> + <a name="M000070"></a> <div class="method-heading"> - <a href="#M000036" class="method-signature"> + <a href="#M000070" class="method-signature"> + <span class="method-name">archive</span><span class="method-args">(sha, file = nil, opts = {})</span> + </a> + </div> + + <div class="method-description"> + <p> +creates an archive file +</p> +<p> +options +</p> +<pre> + :format (zip, tar) + :prefix + :remote + :path +</pre> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000070-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000070-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 399</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">archive</span>(<span class="ruby-identifier">sha</span>, <span class="ruby-identifier">file</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">opts</span> = {}) + <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:format</span>] = <span class="ruby-value str">'zip'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:format</span>] + + <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:format</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'tgz'</span> + <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:format</span>] = <span class="ruby-value str">'tar'</span> + <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:add_gzip</span>] = <span class="ruby-keyword kw">true</span> + <span class="ruby-keyword kw">end</span> + + <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">file</span> + <span class="ruby-identifier">file</span> = <span class="ruby-constant">Tempfile</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'archive'</span>).<span class="ruby-identifier">path</span> + <span class="ruby-keyword kw">end</span> + + <span class="ruby-identifier">arr_opts</span> = [] + <span class="ruby-identifier">arr_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"--format=#{opts[:format]}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:format</span>] + <span class="ruby-identifier">arr_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"--prefix=#{opts[:prefix]}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:prefix</span>] + <span class="ruby-identifier">arr_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"--remote=#{opts[:remote]}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:remote</span>] + <span class="ruby-identifier">arr_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">sha</span> + <span class="ruby-identifier">arr_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:path</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:path</span>] + <span class="ruby-identifier">arr_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'| gzip'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:add_gzip</span>] + <span class="ruby-identifier">arr_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"> #{file.to_s}"</span> + <span class="ruby-identifier">command</span>(<span class="ruby-value str">'archive'</span>, <span class="ruby-identifier">arr_opts</span>) + <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">file</span> + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000037" class="method-detail"> + <a name="M000037"></a> + + <div class="method-heading"> + <a href="#M000037" class="method-signature"> <span class="method-name">branch_current</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000036-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000036-source"> + onclick="toggleCode('M000037-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000037-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 132</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 138</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">branch_current</span> <span class="ruby-identifier">branches_all</span>.<span class="ruby-identifier">select</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">b</span><span class="ruby-operator">|</span> <span class="ruby-identifier">b</span>[<span class="ruby-value">1</span>] }.<span class="ruby-identifier">first</span>[<span class="ruby-value">0</span>] <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">end</span> @@ -228,21 +290,21 @@ </div> </div> - <div id="method-M000052" class="method-detail"> - <a name="M000052"></a> + <div id="method-M000053" class="method-detail"> + <a name="M000053"></a> <div class="method-heading"> - <a href="#M000052" class="method-signature"> + <a href="#M000053" class="method-signature"> <span class="method-name">branch_delete</span><span class="method-args">(branch)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000052-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000052-source"> + onclick="toggleCode('M000053-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000053-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 284</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 290</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">branch_delete</span>(<span class="ruby-identifier">branch</span>) <span class="ruby-identifier">command</span>(<span class="ruby-value str">'branch'</span>, [<span class="ruby-value str">'-d'</span>, <span class="ruby-identifier">branch</span>]) <span class="ruby-keyword kw">end</span> @@ -251,21 +313,21 @@ </div> </div> - <div id="method-M000051" class="method-detail"> - <a name="M000051"></a> + <div id="method-M000052" class="method-detail"> + <a name="M000052"></a> <div class="method-heading"> - <a href="#M000051" class="method-signature"> + <a href="#M000052" class="method-signature"> <span class="method-name">branch_new</span><span class="method-args">(branch)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000051-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000051-source"> + onclick="toggleCode('M000052-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000052-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 280</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 286</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">branch_new</span>(<span class="ruby-identifier">branch</span>) <span class="ruby-identifier">command</span>(<span class="ruby-value str">'branch'</span>, <span class="ruby-identifier">branch</span>) <span class="ruby-keyword kw">end</span> @@ -274,21 +336,21 @@ </div> </div> - <div id="method-M000035" class="method-detail"> - <a name="M000035"></a> + <div id="method-M000036" class="method-detail"> + <a name="M000036"></a> <div class="method-heading"> - <a href="#M000035" class="method-signature"> + <a href="#M000036" class="method-signature"> <span class="method-name">branches_all</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000035-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000035-source"> + onclick="toggleCode('M000036-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000036-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 122</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 128</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">branches_all</span> <span class="ruby-identifier">arr</span> = [] <span class="ruby-identifier">command_lines</span>(<span class="ruby-value str">'branch'</span>, <span class="ruby-value str">'-a'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">b</span><span class="ruby-operator">|</span> @@ -303,21 +365,21 @@ </div> </div> - <div id="method-M000053" class="method-detail"> - <a name="M000053"></a> + <div id="method-M000054" class="method-detail"> + <a name="M000054"></a> <div class="method-heading"> - <a href="#M000053" class="method-signature"> + <a href="#M000054" class="method-signature"> <span class="method-name">checkout</span><span class="method-args">(branch, opts = {})</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000053-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000053-source"> + onclick="toggleCode('M000054-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000054-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 288</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 294</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">checkout</span>(<span class="ruby-identifier">branch</span>, <span class="ruby-identifier">opts</span> = {}) <span class="ruby-identifier">arr_opts</span> = [] <span class="ruby-identifier">arr_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'-f'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:force</span>] @@ -330,6 +392,34 @@ </div> </div> + <div id="method-M000069" class="method-detail"> + <a name="M000069"></a> + + <div class="method-heading"> + <a href="#M000069" class="method-signature"> + <span class="method-name">checkout_index</span><span class="method-args">(opts = {})</span> + </a> + </div> + + <div class="method-description"> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000069-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000069-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 383</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">checkout_index</span>(<span class="ruby-identifier">opts</span> = {}) + <span class="ruby-identifier">arr_opts</span> = [] + <span class="ruby-identifier">arr_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"--prefix=#{opts[:prefix]}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:prefix</span>] + <span class="ruby-identifier">arr_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"--force"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:force</span>] + <span class="ruby-identifier">arr_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"--all"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:all</span>] + <span class="ruby-identifier">arr_opts</span> <span class="ruby-operator"><<</span> (<span class="ruby-value str">'-- '</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:path_limiter</span>]) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:path_limiter</span>].<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">String</span> + <span class="ruby-identifier">command</span>(<span class="ruby-value str">'checkout-index'</span>, <span class="ruby-identifier">arr_opts</span>) + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + <div id="method-M000027" class="method-detail"> <a name="M000027"></a> @@ -363,7 +453,7 @@ TODO - make this work with SSH password or auth_key onclick="toggleCode('M000027-source');return false;">[Source]</a></p> <div class="method-source-code" id="M000027-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 40</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 42</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clone</span>(<span class="ruby-identifier">repository</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">opts</span> = {}) <span class="ruby-ivar">@path</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:path</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'.'</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:path</span>] <span class="ruby-operator">?</span> <span class="ruby-identifier">clone_dir</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-ivar">@path</span>, <span class="ruby-identifier">name</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">clone_dir</span> = <span class="ruby-identifier">name</span> @@ -383,21 +473,21 @@ TODO - make this work with SSH password or auth_key </div> </div> - <div id="method-M000049" class="method-detail"> - <a name="M000049"></a> + <div id="method-M000050" class="method-detail"> + <a name="M000050"></a> <div class="method-heading"> - <a href="#M000049" class="method-signature"> + <a href="#M000050" class="method-signature"> <span class="method-name">commit</span><span class="method-args">(message, opts = {})</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000049-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000049-source"> + onclick="toggleCode('M000050-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000050-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 266</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 272</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">commit</span>(<span class="ruby-identifier">message</span>, <span class="ruby-identifier">opts</span> = {}) <span class="ruby-identifier">arr_opts</span> = [<span class="ruby-node">"-m '#{message}'"</span>] <span class="ruby-identifier">arr_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'-a'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:add_all</span>] @@ -408,11 +498,11 @@ TODO - make this work with SSH password or auth_key </div> </div> - <div id="method-M000032" class="method-detail"> - <a name="M000032"></a> + <div id="method-M000033" class="method-detail"> + <a name="M000033"></a> <div class="method-heading"> - <a href="#M000032" class="method-signature"> + <a href="#M000033" class="method-signature"> <span class="method-name">commit_data</span><span class="method-args">(sha)</span> </a> </div> @@ -422,10 +512,10 @@ TODO - make this work with SSH password or auth_key returns useful array of raw commit object data </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000032-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000032-source"> + onclick="toggleCode('M000033-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000033-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 83</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 89</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">commit_data</span>(<span class="ruby-identifier">sha</span>) <span class="ruby-identifier">in_message</span> = <span class="ruby-keyword kw">false</span> @@ -455,23 +545,33 @@ returns useful array of raw commit object data </div> </div> - <div id="method-M000044" class="method-detail"> - <a name="M000044"></a> + <div id="method-M000067" class="method-detail"> + <a name="M000067"></a> <div class="method-heading"> - <a href="#M000044" class="method-signature"> - <span class="method-name">config_get</span><span class="method-args">(name)</span> + <a href="#M000067" class="method-signature"> + <span class="method-name">commit_tree</span><span class="method-args">(tree, opts = {})</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000044-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000044-source"> + onclick="toggleCode('M000067-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000067-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 232</span> - <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">config_get</span>(<span class="ruby-identifier">name</span>) - <span class="ruby-identifier">command</span>(<span class="ruby-value str">'config'</span>, [<span class="ruby-value str">'--get'</span>, <span class="ruby-identifier">name</span>]) +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 365</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">commit_tree</span>(<span class="ruby-identifier">tree</span>, <span class="ruby-identifier">opts</span> = {}) + <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:message</span>] = <span class="ruby-node">"commit tree #{tree}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:message</span>] + <span class="ruby-identifier">t</span> = <span class="ruby-constant">Tempfile</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'commit-message'</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span> + <span class="ruby-identifier">t</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:message</span>]) + <span class="ruby-keyword kw">end</span> + + <span class="ruby-identifier">arr_opts</span> = [] + <span class="ruby-identifier">arr_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">tree</span> + <span class="ruby-identifier">arr_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"-p #{opts[:parent]}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:parent</span>] + <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:parents</span>].<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span> <span class="ruby-identifier">arr_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"-p #{p.to_s}"</span> } <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:parents</span>] + <span class="ruby-identifier">arr_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"< #{t.path}"</span> + <span class="ruby-identifier">command</span>(<span class="ruby-value str">'commit-tree'</span>, <span class="ruby-identifier">arr_opts</span>) <span class="ruby-keyword kw">end</span> </pre> </div> @@ -483,7 +583,7 @@ returns useful array of raw commit object data <div class="method-heading"> <a href="#M000045" class="method-signature"> - <span class="method-name">config_list</span><span class="method-args">()</span> + <span class="method-name">config_get</span><span class="method-args">(name)</span> </a> </div> @@ -492,7 +592,30 @@ returns useful array of raw commit object data onclick="toggleCode('M000045-source');return false;">[Source]</a></p> <div class="method-source-code" id="M000045-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 236</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 238</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">config_get</span>(<span class="ruby-identifier">name</span>) + <span class="ruby-identifier">command</span>(<span class="ruby-value str">'config'</span>, [<span class="ruby-value str">'--get'</span>, <span class="ruby-identifier">name</span>]) + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000046" class="method-detail"> + <a name="M000046"></a> + + <div class="method-heading"> + <a href="#M000046" class="method-signature"> + <span class="method-name">config_list</span><span class="method-args">()</span> + </a> + </div> + + <div class="method-description"> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000046-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000046-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 242</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">config_list</span> <span class="ruby-identifier">hsh</span> = {} <span class="ruby-identifier">command_lines</span>(<span class="ruby-value str">'config'</span>, [<span class="ruby-value str">'--list'</span>]).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> @@ -506,21 +629,21 @@ returns useful array of raw commit object data </div> </div> - <div id="method-M000043" class="method-detail"> - <a name="M000043"></a> + <div id="method-M000044" class="method-detail"> + <a name="M000044"></a> <div class="method-heading"> - <a href="#M000043" class="method-signature"> + <a href="#M000044" class="method-signature"> <span class="method-name">config_remote</span><span class="method-args">(name)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000043-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000043-source"> + onclick="toggleCode('M000044-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000044-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 223</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 229</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">config_remote</span>(<span class="ruby-identifier">name</span>) <span class="ruby-identifier">hsh</span> = {} <span class="ruby-identifier">command_lines</span>(<span class="ruby-value str">'config'</span>, [<span class="ruby-value str">'--get-regexp'</span>, <span class="ruby-node">"remote.#{name}"</span>]).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> @@ -534,11 +657,11 @@ returns useful array of raw commit object data </div> </div> - <div id="method-M000046" class="method-detail"> - <a name="M000046"></a> + <div id="method-M000047" class="method-detail"> + <a name="M000047"></a> <div class="method-heading"> - <a href="#M000046" class="method-signature"> + <a href="#M000047" class="method-signature"> <span class="method-name">config_set</span><span class="method-args">(name, value)</span> </a> </div> @@ -548,10 +671,10 @@ returns useful array of raw commit object data WRITE COMMANDS ## </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000046-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000046-source"> + onclick="toggleCode('M000047-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000047-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 247</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 253</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">config_set</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span>) <span class="ruby-identifier">command</span>(<span class="ruby-value str">'config'</span>, [<span class="ruby-identifier">name</span>, <span class="ruby-node">"'#{value}'"</span>]) <span class="ruby-keyword kw">end</span> @@ -560,11 +683,11 @@ WRITE COMMANDS ## </div> </div> - <div id="method-M000040" class="method-detail"> - <a name="M000040"></a> + <div id="method-M000041" class="method-detail"> + <a name="M000041"></a> <div class="method-heading"> - <a href="#M000040" class="method-signature"> + <a href="#M000041" class="method-signature"> <span class="method-name">diff_files</span><span class="method-args">()</span> </a> </div> @@ -574,10 +697,10 @@ WRITE COMMANDS ## compares the index and the working directory </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000040-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000040-source"> + onclick="toggleCode('M000041-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000041-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 189</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 195</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">diff_files</span> <span class="ruby-identifier">hsh</span> = {} <span class="ruby-identifier">command_lines</span>(<span class="ruby-value str">'diff-files'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> @@ -593,21 +716,21 @@ compares the index and the working directory </div> </div> - <div id="method-M000038" class="method-detail"> - <a name="M000038"></a> + <div id="method-M000039" class="method-detail"> + <a name="M000039"></a> <div class="method-heading"> - <a href="#M000038" class="method-signature"> + <a href="#M000039" class="method-signature"> <span class="method-name">diff_full</span><span class="method-args">(obj1 = 'HEAD', obj2 = nil, opts = {})</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000038-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000038-source"> + onclick="toggleCode('M000039-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000039-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 159</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 165</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">diff_full</span>(<span class="ruby-identifier">obj1</span> = <span class="ruby-value str">'HEAD'</span>, <span class="ruby-identifier">obj2</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">opts</span> = {}) <span class="ruby-identifier">diff_opts</span> = [<span class="ruby-value str">'-p'</span>] <span class="ruby-identifier">diff_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">obj1</span> @@ -621,11 +744,11 @@ compares the index and the working directory </div> </div> - <div id="method-M000041" class="method-detail"> - <a name="M000041"></a> + <div id="method-M000042" class="method-detail"> + <a name="M000042"></a> <div class="method-heading"> - <a href="#M000041" class="method-signature"> + <a href="#M000042" class="method-signature"> <span class="method-name">diff_index</span><span class="method-args">(treeish)</span> </a> </div> @@ -635,10 +758,10 @@ compares the index and the working directory compares the index and the repository </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000041-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000041-source"> + onclick="toggleCode('M000042-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000042-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 201</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 207</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">diff_index</span>(<span class="ruby-identifier">treeish</span>) <span class="ruby-identifier">hsh</span> = {} <span class="ruby-identifier">command_lines</span>(<span class="ruby-value str">'diff-index'</span>, <span class="ruby-identifier">treeish</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> @@ -654,21 +777,21 @@ compares the index and the repository </div> </div> - <div id="method-M000039" class="method-detail"> - <a name="M000039"></a> + <div id="method-M000040" class="method-detail"> + <a name="M000040"></a> <div class="method-heading"> - <a href="#M000039" class="method-signature"> + <a href="#M000040" class="method-signature"> <span class="method-name">diff_stats</span><span class="method-args">(obj1 = 'HEAD', obj2 = nil, opts = {})</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000039-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000039-source"> + onclick="toggleCode('M000040-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000040-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 168</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 174</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">diff_stats</span>(<span class="ruby-identifier">obj1</span> = <span class="ruby-value str">'HEAD'</span>, <span class="ruby-identifier">obj2</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">opts</span> = {}) <span class="ruby-identifier">diff_opts</span> = [<span class="ruby-value str">'--numstat'</span>] <span class="ruby-identifier">diff_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">obj1</span> @@ -693,21 +816,21 @@ compares the index and the repository </div> </div> - <div id="method-M000060" class="method-detail"> - <a name="M000060"></a> + <div id="method-M000061" class="method-detail"> + <a name="M000061"></a> <div class="method-heading"> - <a href="#M000060" class="method-signature"> + <a href="#M000061" class="method-signature"> <span class="method-name">fetch</span><span class="method-args">(remote)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000060-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000060-source"> + onclick="toggleCode('M000061-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000061-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 331</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 337</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fetch</span>(<span class="ruby-identifier">remote</span>) <span class="ruby-identifier">command</span>(<span class="ruby-value str">'fetch'</span>, <span class="ruby-identifier">remote</span>.<span class="ruby-identifier">to_s</span>) <span class="ruby-keyword kw">end</span> @@ -716,11 +839,11 @@ compares the index and the repository </div> </div> - <div id="method-M000037" class="method-detail"> - <a name="M000037"></a> + <div id="method-M000038" class="method-detail"> + <a name="M000038"></a> <div class="method-heading"> - <a href="#M000037" class="method-signature"> + <a href="#M000038" class="method-signature"> <span class="method-name">grep</span><span class="method-args">(string, opts = {})</span> </a> </div> @@ -738,10 +861,10 @@ returns hash </dd> </dl> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000037-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000037-source"> + onclick="toggleCode('M000038-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000038-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 140</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 146</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">grep</span>(<span class="ruby-identifier">string</span>, <span class="ruby-identifier">opts</span> = {}) <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:object</span>] = <span class="ruby-value str">'HEAD'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:object</span>] @@ -779,7 +902,7 @@ returns hash onclick="toggleCode('M000026-source');return false;">[Source]</a></p> <div class="method-source-code" id="M000026-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 25</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 27</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">init</span> <span class="ruby-identifier">command</span>(<span class="ruby-value str">'init'</span>) <span class="ruby-keyword kw">end</span> @@ -805,7 +928,7 @@ READ COMMANDS ## onclick="toggleCode('M000028-source');return false;">[Source]</a></p> <div class="method-source-code" id="M000028-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 59</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 61</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_commits</span>(<span class="ruby-identifier">opts</span> = {}) <span class="ruby-identifier">arr_opts</span> = [<span class="ruby-value str">'--pretty=oneline'</span>] <span class="ruby-identifier">arr_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"-#{opts[:count]}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:count</span>] @@ -821,21 +944,21 @@ READ COMMANDS ## </div> </div> - <div id="method-M000042" class="method-detail"> - <a name="M000042"></a> + <div id="method-M000043" class="method-detail"> + <a name="M000043"></a> <div class="method-heading"> - <a href="#M000042" class="method-signature"> + <a href="#M000043" class="method-signature"> <span class="method-name">ls_files</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000042-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000042-source"> + onclick="toggleCode('M000043-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000043-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 212</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 218</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ls_files</span> <span class="ruby-identifier">hsh</span> = {} <span class="ruby-identifier">command_lines</span>(<span class="ruby-value str">'ls-files'</span>, <span class="ruby-value str">'--stage'</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> @@ -850,21 +973,21 @@ READ COMMANDS ## </div> </div> - <div id="method-M000034" class="method-detail"> - <a name="M000034"></a> + <div id="method-M000035" class="method-detail"> + <a name="M000035"></a> <div class="method-heading"> - <a href="#M000034" class="method-signature"> + <a href="#M000035" class="method-signature"> <span class="method-name">ls_tree</span><span class="method-args">(sha)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000034-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000034-source"> + onclick="toggleCode('M000035-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000035-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 112</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 118</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ls_tree</span>(<span class="ruby-identifier">sha</span>) <span class="ruby-identifier">data</span> = {<span class="ruby-value str">'blob'</span> =<span class="ruby-operator">></span> {}, <span class="ruby-value str">'tree'</span> =<span class="ruby-operator">></span> {}} <span class="ruby-identifier">command_lines</span>(<span class="ruby-value str">'ls-tree'</span>, <span class="ruby-identifier">sha</span>.<span class="ruby-identifier">to_s</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> @@ -879,21 +1002,21 @@ READ COMMANDS ## </div> </div> - <div id="method-M000054" class="method-detail"> - <a name="M000054"></a> + <div id="method-M000055" class="method-detail"> + <a name="M000055"></a> <div class="method-heading"> - <a href="#M000054" class="method-signature"> + <a href="#M000055" class="method-signature"> <span class="method-name">merge</span><span class="method-args">(branch, message = nil)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000054-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000054-source"> + onclick="toggleCode('M000055-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000055-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 296</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 302</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">merge</span>(<span class="ruby-identifier">branch</span>, <span class="ruby-identifier">message</span> = <span class="ruby-keyword kw">nil</span>) <span class="ruby-identifier">arr_opts</span> = [] <span class="ruby-identifier">arr_opts</span> <span class="ruby-operator"><<</span> [<span class="ruby-node">"-m '#{message}'"</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">message</span> @@ -905,21 +1028,44 @@ READ COMMANDS ## </div> </div> - <div id="method-M000033" class="method-detail"> - <a name="M000033"></a> + <div id="method-M000030" class="method-detail"> + <a name="M000030"></a> <div class="method-heading"> - <a href="#M000033" class="method-signature"> + <a href="#M000030" class="method-signature"> + <span class="method-name">namerev</span><span class="method-args">(string)</span> + </a> + </div> + + <div class="method-description"> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000030-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000030-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 76</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">namerev</span>(<span class="ruby-identifier">string</span>) + <span class="ruby-identifier">command</span>(<span class="ruby-value str">'name-rev'</span>, <span class="ruby-identifier">string</span>).<span class="ruby-identifier">split</span>[<span class="ruby-value">1</span>] + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000034" class="method-detail"> + <a name="M000034"></a> + + <div class="method-heading"> + <a href="#M000034" class="method-signature"> <span class="method-name">object_contents</span><span class="method-args">(sha)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000033-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000033-source"> + onclick="toggleCode('M000034-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000034-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 108</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 114</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">object_contents</span>(<span class="ruby-identifier">sha</span>) <span class="ruby-identifier">command</span>(<span class="ruby-value str">'cat-file'</span>, [<span class="ruby-value str">'-p'</span>, <span class="ruby-identifier">sha</span>]) <span class="ruby-keyword kw">end</span> @@ -928,21 +1074,21 @@ READ COMMANDS ## </div> </div> - <div id="method-M000031" class="method-detail"> - <a name="M000031"></a> + <div id="method-M000032" class="method-detail"> + <a name="M000032"></a> <div class="method-heading"> - <a href="#M000031" class="method-signature"> + <a href="#M000032" class="method-signature"> <span class="method-name">object_size</span><span class="method-args">(sha)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000031-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000031-source"> + onclick="toggleCode('M000032-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000032-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 78</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 84</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">object_size</span>(<span class="ruby-identifier">sha</span>) <span class="ruby-identifier">command</span>(<span class="ruby-value str">'cat-file'</span>, [<span class="ruby-value str">'-s'</span>, <span class="ruby-identifier">sha</span>]).<span class="ruby-identifier">to_i</span> <span class="ruby-keyword kw">end</span> @@ -951,21 +1097,21 @@ READ COMMANDS ## </div> </div> - <div id="method-M000030" class="method-detail"> - <a name="M000030"></a> + <div id="method-M000031" class="method-detail"> + <a name="M000031"></a> <div class="method-heading"> - <a href="#M000030" class="method-signature"> + <a href="#M000031" class="method-signature"> <span class="method-name">object_type</span><span class="method-args">(sha)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000030-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000030-source"> + onclick="toggleCode('M000031-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000031-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 74</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 80</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">object_type</span>(<span class="ruby-identifier">sha</span>) <span class="ruby-identifier">command</span>(<span class="ruby-value str">'cat-file'</span>, [<span class="ruby-value str">'-t'</span>, <span class="ruby-identifier">sha</span>]) <span class="ruby-keyword kw">end</span> @@ -974,21 +1120,21 @@ READ COMMANDS ## </div> </div> - <div id="method-M000061" class="method-detail"> - <a name="M000061"></a> + <div id="method-M000062" class="method-detail"> + <a name="M000062"></a> <div class="method-heading"> - <a href="#M000061" class="method-signature"> + <a href="#M000062" class="method-signature"> <span class="method-name">push</span><span class="method-args">(remote, branch = 'master')</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000061-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000061-source"> + onclick="toggleCode('M000062-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000062-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 335</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 341</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">push</span>(<span class="ruby-identifier">remote</span>, <span class="ruby-identifier">branch</span> = <span class="ruby-value str">'master'</span>) <span class="ruby-identifier">command</span>(<span class="ruby-value str">'push'</span>, [<span class="ruby-identifier">remote</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">branch</span>.<span class="ruby-identifier">to_s</span>]) <span class="ruby-keyword kw">end</span> @@ -997,21 +1143,50 @@ READ COMMANDS ## </div> </div> - <div id="method-M000055" class="method-detail"> - <a name="M000055"></a> + <div id="method-M000065" class="method-detail"> + <a name="M000065"></a> <div class="method-heading"> - <a href="#M000055" class="method-signature"> + <a href="#M000065" class="method-signature"> + <span class="method-name">read_tree</span><span class="method-args">(treeish, opts = {})</span> + </a> + </div> + + <div class="method-description"> + <p> +reads a tree into the current index file +</p> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000065-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000065-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 354</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read_tree</span>(<span class="ruby-identifier">treeish</span>, <span class="ruby-identifier">opts</span> = {}) + <span class="ruby-identifier">arr_opts</span> = [] + <span class="ruby-identifier">arr_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"--prefix=#{opts[:prefix]}"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:prefix</span>] + <span class="ruby-identifier">arr_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">treeish</span>.<span class="ruby-identifier">to_a</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>) + <span class="ruby-identifier">command</span>(<span class="ruby-value str">'read-tree'</span>, <span class="ruby-identifier">arr_opts</span>) + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000056" class="method-detail"> + <a name="M000056"></a> + + <div class="method-heading"> + <a href="#M000056" class="method-signature"> <span class="method-name">remote_add</span><span class="method-args">(name, url, opts = {})</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000055-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000055-source"> + onclick="toggleCode('M000056-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000056-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 303</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 309</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remote_add</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">url</span>, <span class="ruby-identifier">opts</span> = {}) <span class="ruby-identifier">arr_opts</span> = [<span class="ruby-value str">'add'</span>] <span class="ruby-identifier">arr_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'-f'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:with_fetch</span>] @@ -1025,11 +1200,11 @@ READ COMMANDS ## </div> </div> - <div id="method-M000056" class="method-detail"> - <a name="M000056"></a> + <div id="method-M000057" class="method-detail"> + <a name="M000057"></a> <div class="method-heading"> - <a href="#M000056" class="method-signature"> + <a href="#M000057" class="method-signature"> <span class="method-name">remote_remove</span><span class="method-args">(name)</span> </a> </div> @@ -1040,10 +1215,10 @@ this is documented as such, but seems broken for some reason i’ll try to get around it some other way later </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000056-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000056-source"> + onclick="toggleCode('M000057-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000057-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 314</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 320</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remote_remove</span>(<span class="ruby-identifier">name</span>) <span class="ruby-identifier">command</span>(<span class="ruby-value str">'remote'</span>, [<span class="ruby-value str">'rm'</span>, <span class="ruby-identifier">name</span>]) <span class="ruby-keyword kw">end</span> @@ -1052,21 +1227,21 @@ to get around it some other way later </div> </div> - <div id="method-M000057" class="method-detail"> - <a name="M000057"></a> + <div id="method-M000058" class="method-detail"> + <a name="M000058"></a> <div class="method-heading"> - <a href="#M000057" class="method-signature"> + <a href="#M000058" class="method-signature"> <span class="method-name">remotes</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000057-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000057-source"> + onclick="toggleCode('M000058-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000058-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 318</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 324</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remotes</span> <span class="ruby-identifier">command_lines</span>(<span class="ruby-value str">'remote'</span>) <span class="ruby-keyword kw">end</span> @@ -1075,21 +1250,21 @@ to get around it some other way later </div> </div> - <div id="method-M000048" class="method-detail"> - <a name="M000048"></a> + <div id="method-M000049" class="method-detail"> + <a name="M000049"></a> <div class="method-heading"> - <a href="#M000048" class="method-signature"> + <a href="#M000049" class="method-signature"> <span class="method-name">remove</span><span class="method-args">(path = '.', opts = {})</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000048-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000048-source"> + onclick="toggleCode('M000049-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000049-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 256</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 262</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove</span>(<span class="ruby-identifier">path</span> = <span class="ruby-value str">'.'</span>, <span class="ruby-identifier">opts</span> = {}) <span class="ruby-identifier">path</span> = <span class="ruby-identifier">path</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">path</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>) @@ -1104,21 +1279,21 @@ to get around it some other way later </div> </div> - <div id="method-M000063" class="method-detail"> - <a name="M000063"></a> + <div id="method-M000064" class="method-detail"> + <a name="M000064"></a> <div class="method-heading"> - <a href="#M000063" class="method-signature"> + <a href="#M000064" class="method-signature"> <span class="method-name">repack</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000063-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000063-source"> + onclick="toggleCode('M000064-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000064-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 343</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 349</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">repack</span> <span class="ruby-identifier">command</span>(<span class="ruby-value str">'repack'</span>, [<span class="ruby-value str">'-a'</span>, <span class="ruby-value str">'-d'</span>]) <span class="ruby-keyword kw">end</span> @@ -1127,21 +1302,21 @@ to get around it some other way later </div> </div> - <div id="method-M000050" class="method-detail"> - <a name="M000050"></a> + <div id="method-M000051" class="method-detail"> + <a name="M000051"></a> <div class="method-heading"> - <a href="#M000050" class="method-signature"> + <a href="#M000051" class="method-signature"> <span class="method-name">reset</span><span class="method-args">(commit, opts = {})</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000050-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000050-source"> + onclick="toggleCode('M000051-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000051-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 272</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 278</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset</span>(<span class="ruby-identifier">commit</span>, <span class="ruby-identifier">opts</span> = {}) <span class="ruby-identifier">arr_opts</span> = [] <span class="ruby-identifier">arr_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'--hard'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:hard</span>] @@ -1167,7 +1342,7 @@ to get around it some other way later onclick="toggleCode('M000029-source');return false;">[Source]</a></p> <div class="method-source-code" id="M000029-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 70</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 72</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">revparse</span>(<span class="ruby-identifier">string</span>) <span class="ruby-identifier">command</span>(<span class="ruby-value str">'rev-parse'</span>, <span class="ruby-identifier">string</span>) <span class="ruby-keyword kw">end</span> @@ -1176,21 +1351,21 @@ to get around it some other way later </div> </div> - <div id="method-M000059" class="method-detail"> - <a name="M000059"></a> + <div id="method-M000060" class="method-detail"> + <a name="M000060"></a> <div class="method-heading"> - <a href="#M000059" class="method-signature"> + <a href="#M000060" class="method-signature"> <span class="method-name">tag</span><span class="method-args">(tag)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000059-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000059-source"> + onclick="toggleCode('M000060-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000060-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 326</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 332</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tag</span>(<span class="ruby-identifier">tag</span>) <span class="ruby-identifier">command</span>(<span class="ruby-value str">'tag'</span>, <span class="ruby-identifier">tag</span>) <span class="ruby-keyword kw">end</span> @@ -1199,21 +1374,21 @@ to get around it some other way later </div> </div> - <div id="method-M000062" class="method-detail"> - <a name="M000062"></a> + <div id="method-M000063" class="method-detail"> + <a name="M000063"></a> <div class="method-heading"> - <a href="#M000062" class="method-signature"> + <a href="#M000063" class="method-signature"> <span class="method-name">tag_sha</span><span class="method-args">(tag_name)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000062-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000062-source"> + onclick="toggleCode('M000063-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000063-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 339</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 345</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tag_sha</span>(<span class="ruby-identifier">tag_name</span>) <span class="ruby-identifier">command</span>(<span class="ruby-value str">'show-ref'</span>, [<span class="ruby-value str">'--tags'</span>, <span class="ruby-value str">'-s'</span>, <span class="ruby-identifier">tag_name</span>]) <span class="ruby-keyword kw">end</span> @@ -1222,21 +1397,21 @@ to get around it some other way later </div> </div> - <div id="method-M000058" class="method-detail"> - <a name="M000058"></a> + <div id="method-M000059" class="method-detail"> + <a name="M000059"></a> <div class="method-heading"> - <a href="#M000058" class="method-signature"> + <a href="#M000059" class="method-signature"> <span class="method-name">tags</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000058-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000058-source"> + onclick="toggleCode('M000059-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000059-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/lib.rb, line 322</span> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 328</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tags</span> <span class="ruby-identifier">command_lines</span>(<span class="ruby-value str">'tag'</span>) <span class="ruby-keyword kw">end</span> @@ -1245,6 +1420,52 @@ to get around it some other way later </div> </div> + <div id="method-M000068" class="method-detail"> + <a name="M000068"></a> + + <div class="method-heading"> + <a href="#M000068" class="method-signature"> + <span class="method-name">update_ref</span><span class="method-args">(branch, commit)</span> + </a> + </div> + + <div class="method-description"> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000068-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000068-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 379</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_ref</span>(<span class="ruby-identifier">branch</span>, <span class="ruby-identifier">commit</span>) + <span class="ruby-identifier">command</span>(<span class="ruby-value str">'update-ref'</span>, [<span class="ruby-identifier">branch</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">commit</span>.<span class="ruby-identifier">to_s</span>]) + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000066" class="method-detail"> + <a name="M000066"></a> + + <div class="method-heading"> + <a href="#M000066" class="method-signature"> + <span class="method-name">write_tree</span><span class="method-args">()</span> + </a> + </div> + + <div class="method-description"> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000066-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000066-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/lib.rb, line 361</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write_tree</span> + <span class="ruby-identifier">command</span>(<span class="ruby-value str">'write-tree'</span>) + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + </div> diff --git a/doc/classes/Git/Object.html b/doc/classes/Git/Object.html index cde1e7d..a755c21 100644 --- a/doc/classes/Git/Object.html +++ b/doc/classes/Git/Object.html @@ -94,7 +94,7 @@ represents a git object <h3 class="section-bar">Methods</h3> <div class="name-list"> - <a href="#M000125">new</a> + <a href="#M000149">new</a> </div> </div> @@ -126,12 +126,12 @@ Class <a href="Object/Tree.html" class="link">Git::Object::Tree</a><br /> <div id="methods"> <h3 class="section-bar">Public Class methods</h3> - <div id="method-M000125" class="method-detail"> - <a name="M000125"></a> + <div id="method-M000149" class="method-detail"> + <a name="M000149"></a> <div class="method-heading"> - <a href="#M000125" class="method-signature"> - <span class="method-name">new</span><span class="method-args">(base, objectish, is_tag = false)</span> + <a href="#M000149" class="method-signature"> + <span class="method-name">new</span><span class="method-args">(base, objectish, type = nil, is_tag = false)</span> </a> </div> @@ -141,11 +141,11 @@ if we’re calling this, we don’t know what type it is yet so this is our little factory method </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000125-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000125-source"> + onclick="toggleCode('M000149-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000149-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/object.rb, line 206</span> - <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">new</span>(<span class="ruby-identifier">base</span>, <span class="ruby-identifier">objectish</span>, <span class="ruby-identifier">is_tag</span> = <span class="ruby-keyword kw">false</span>) +<span class="ruby-comment cmt"># File lib/git/object.rb, line 242</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">new</span>(<span class="ruby-identifier">base</span>, <span class="ruby-identifier">objectish</span>, <span class="ruby-identifier">type</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">is_tag</span> = <span class="ruby-keyword kw">false</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">is_tag</span> <span class="ruby-identifier">sha</span> = <span class="ruby-identifier">base</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">tag_sha</span>(<span class="ruby-identifier">objectish</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">sha</span> <span class="ruby-operator">==</span> <span class="ruby-value str">''</span> @@ -153,8 +153,9 @@ this is our little factory method <span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">return</span> <span class="ruby-constant">Tag</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">base</span>, <span class="ruby-identifier">sha</span>, <span class="ruby-identifier">objectish</span>) <span class="ruby-keyword kw">else</span> - <span class="ruby-identifier">sha</span> = <span class="ruby-identifier">base</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">revparse</span>(<span class="ruby-identifier">objectish</span>) - <span class="ruby-identifier">type</span> = <span class="ruby-identifier">base</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">object_type</span>(<span class="ruby-identifier">sha</span>) + <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">type</span> + <span class="ruby-identifier">type</span> = <span class="ruby-identifier">base</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">object_type</span>(<span class="ruby-identifier">objectish</span>) + <span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">end</span> <span class="ruby-identifier">klass</span> = @@ -163,7 +164,7 @@ this is our little factory method <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/commit/</span><span class="ruby-operator">:</span> <span class="ruby-constant">Commit</span> <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/tree/</span><span class="ruby-operator">:</span> <span class="ruby-constant">Tree</span> <span class="ruby-keyword kw">end</span> - <span class="ruby-identifier">klass</span><span class="ruby-operator">::</span><span class="ruby-identifier">new</span>(<span class="ruby-identifier">base</span>, <span class="ruby-identifier">sha</span>) + <span class="ruby-identifier">klass</span><span class="ruby-operator">::</span><span class="ruby-identifier">new</span>(<span class="ruby-identifier">base</span>, <span class="ruby-identifier">objectish</span>) <span class="ruby-keyword kw">end</span> </pre> </div> diff --git a/doc/classes/Git/Object/AbstractObject.html b/doc/classes/Git/Object/AbstractObject.html index 222bc67..86529df 100644 --- a/doc/classes/Git/Object/AbstractObject.html +++ b/doc/classes/Git/Object/AbstractObject.html @@ -86,14 +86,21 @@ <h3 class="section-bar">Methods</h3> <div class="name-list"> - <a href="#M000137">contents</a> - <a href="#M000138">contents_array</a> - <a href="#M000142">diff</a> - <a href="#M000141">grep</a> - <a href="#M000143">log</a> - <a href="#M000136">new</a> - <a href="#M000139">setup</a> - <a href="#M000140">to_s</a> + <a href="#M000171">archive</a> + <a href="#M000173">blob?</a> + <a href="#M000174">commit?</a> + <a href="#M000164">contents</a> + <a href="#M000165">contents_array</a> + <a href="#M000169">diff</a> + <a href="#M000168">grep</a> + <a href="#M000170">log</a> + <a href="#M000161">new</a> + <a href="#M000166">setup</a> + <a href="#M000162">sha</a> + <a href="#M000163">size</a> + <a href="#M000175">tag?</a> + <a href="#M000167">to_s</a> + <a href="#M000172">tree?</a> </div> </div> @@ -119,7 +126,7 @@ <td class="context-item-desc"></td> </tr> <tr class="top-aligned-row context-row"> - <td class="context-item-name">sha</td> + <td class="context-item-name">objectish</td> <td class="context-item-value"> [RW] </td> <td class="context-item-desc"></td> </tr> @@ -143,25 +150,24 @@ <div id="methods"> <h3 class="section-bar">Public Class methods</h3> - <div id="method-M000136" class="method-detail"> - <a name="M000136"></a> + <div id="method-M000161" class="method-detail"> + <a name="M000161"></a> <div class="method-heading"> - <a href="#M000136" class="method-signature"> - <span class="method-name">new</span><span class="method-args">(base, sha)</span> + <a href="#M000161" class="method-signature"> + <span class="method-name">new</span><span class="method-args">(base, objectish)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000136-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000136-source"> + onclick="toggleCode('M000161-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000161-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/object.rb, line 14</span> - <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">base</span>, <span class="ruby-identifier">sha</span>) +<span class="ruby-comment cmt"># File lib/git/object.rb, line 17</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">base</span>, <span class="ruby-identifier">objectish</span>) <span class="ruby-ivar">@base</span> = <span class="ruby-identifier">base</span> - <span class="ruby-ivar">@sha</span> = <span class="ruby-identifier">sha</span>.<span class="ruby-identifier">to_s</span> - <span class="ruby-ivar">@size</span> = <span class="ruby-ivar">@base</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">object_size</span>(<span class="ruby-ivar">@sha</span>) + <span class="ruby-ivar">@objectish</span> = <span class="ruby-identifier">objectish</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-identifier">setup</span> <span class="ruby-keyword kw">end</span> </pre> @@ -171,44 +177,119 @@ <h3 class="section-bar">Public Instance methods</h3> - <div id="method-M000137" class="method-detail"> - <a name="M000137"></a> + <div id="method-M000171" class="method-detail"> + <a name="M000171"></a> <div class="method-heading"> - <a href="#M000137" class="method-signature"> + <a href="#M000171" class="method-signature"> + <span class="method-name">archive</span><span class="method-args">(file = nil, opts = {})</span> + </a> + </div> + + <div class="method-description"> + <p> +creates an archive of this object (tree) +</p> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000171-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000171-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/object.rb, line 63</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">archive</span>(<span class="ruby-identifier">file</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">opts</span> = {}) + <span class="ruby-ivar">@base</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">archive</span>(<span class="ruby-ivar">@objectish</span>, <span class="ruby-identifier">file</span>, <span class="ruby-identifier">opts</span>) + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000173" class="method-detail"> + <a name="M000173"></a> + + <div class="method-heading"> + <a href="#M000173" class="method-signature"> + <span class="method-name">blob?</span><span class="method-args">()</span> + </a> + </div> + + <div class="method-description"> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000173-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000173-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/object.rb, line 71</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">blob?</span> + <span class="ruby-ivar">@type</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'blob'</span> + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000174" class="method-detail"> + <a name="M000174"></a> + + <div class="method-heading"> + <a href="#M000174" class="method-signature"> + <span class="method-name">commit?</span><span class="method-args">()</span> + </a> + </div> + + <div class="method-description"> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000174-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000174-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/object.rb, line 75</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">commit?</span> + <span class="ruby-ivar">@type</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'commit'</span> + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000164" class="method-detail"> + <a name="M000164"></a> + + <div class="method-heading"> + <a href="#M000164" class="method-signature"> <span class="method-name">contents</span><span class="method-args">()</span> </a> </div> <div class="method-description"> + <p> +caches the contents of this call in memory +</p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000137-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000137-source"> + onclick="toggleCode('M000164-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000164-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/object.rb, line 21</span> +<span class="ruby-comment cmt"># File lib/git/object.rb, line 32</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">contents</span> - <span class="ruby-ivar">@base</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">object_contents</span>(<span class="ruby-ivar">@sha</span>) + <span class="ruby-ivar">@contents</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@contents</span> = <span class="ruby-ivar">@base</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">object_contents</span>(<span class="ruby-ivar">@objectish</span>) <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> - <div id="method-M000138" class="method-detail"> - <a name="M000138"></a> + <div id="method-M000165" class="method-detail"> + <a name="M000165"></a> <div class="method-heading"> - <a href="#M000138" class="method-signature"> + <a href="#M000165" class="method-signature"> <span class="method-name">contents_array</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000138-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000138-source"> + onclick="toggleCode('M000165-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000165-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/object.rb, line 25</span> +<span class="ruby-comment cmt"># File lib/git/object.rb, line 36</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">contents_array</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">contents</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">"\n"</span>) <span class="ruby-keyword kw">end</span> @@ -217,46 +298,46 @@ </div> </div> - <div id="method-M000142" class="method-detail"> - <a name="M000142"></a> + <div id="method-M000169" class="method-detail"> + <a name="M000169"></a> <div class="method-heading"> - <a href="#M000142" class="method-signature"> + <a href="#M000169" class="method-signature"> <span class="method-name">diff</span><span class="method-args">(objectish)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000142-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000142-source"> + onclick="toggleCode('M000169-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000169-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/object.rb, line 43</span> +<span class="ruby-comment cmt"># File lib/git/object.rb, line 54</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">diff</span>(<span class="ruby-identifier">objectish</span>) - <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Diff</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@base</span>, <span class="ruby-ivar">@sha</span>, <span class="ruby-identifier">objectish</span>) + <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Diff</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@base</span>, <span class="ruby-ivar">@objectish</span>, <span class="ruby-identifier">objectish</span>) <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> - <div id="method-M000141" class="method-detail"> - <a name="M000141"></a> + <div id="method-M000168" class="method-detail"> + <a name="M000168"></a> <div class="method-heading"> - <a href="#M000141" class="method-signature"> + <a href="#M000168" class="method-signature"> <span class="method-name">grep</span><span class="method-args">(string, path_limiter = nil, opts = {})</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000141-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000141-source"> + onclick="toggleCode('M000168-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000168-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/object.rb, line 37</span> +<span class="ruby-comment cmt"># File lib/git/object.rb, line 48</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">grep</span>(<span class="ruby-identifier">string</span>, <span class="ruby-identifier">path_limiter</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">opts</span> = {}) - <span class="ruby-identifier">default</span> = {<span class="ruby-identifier">:object</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@sha</span>, <span class="ruby-identifier">:path_limiter</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">path_limiter</span>} + <span class="ruby-identifier">default</span> = {<span class="ruby-identifier">:object</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">sha</span>, <span class="ruby-identifier">:path_limiter</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">path_limiter</span>} <span class="ruby-identifier">grep_options</span> = <span class="ruby-identifier">default</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">opts</span>) <span class="ruby-ivar">@base</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">grep</span>(<span class="ruby-identifier">string</span>, <span class="ruby-identifier">grep_options</span>) <span class="ruby-keyword kw">end</span> @@ -265,44 +346,44 @@ </div> </div> - <div id="method-M000143" class="method-detail"> - <a name="M000143"></a> + <div id="method-M000170" class="method-detail"> + <a name="M000170"></a> <div class="method-heading"> - <a href="#M000143" class="method-signature"> + <a href="#M000170" class="method-signature"> <span class="method-name">log</span><span class="method-args">(count = 30)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000143-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000143-source"> + onclick="toggleCode('M000170-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000170-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/object.rb, line 47</span> +<span class="ruby-comment cmt"># File lib/git/object.rb, line 58</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log</span>(<span class="ruby-identifier">count</span> = <span class="ruby-value">30</span>) - <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Log</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@base</span>, <span class="ruby-identifier">count</span>).<span class="ruby-identifier">object</span>(<span class="ruby-ivar">@sha</span>) + <span class="ruby-constant">Git</span><span class="ruby-operator">::</span><span class="ruby-constant">Log</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@base</span>, <span class="ruby-identifier">count</span>).<span class="ruby-identifier">object</span>(<span class="ruby-ivar">@objectish</span>) <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> - <div id="method-M000139" class="method-detail"> - <a name="M000139"></a> + <div id="method-M000166" class="method-detail"> + <a name="M000166"></a> <div class="method-heading"> - <a href="#M000139" class="method-signature"> + <a href="#M000166" class="method-signature"> <span class="method-name">setup</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000139-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000139-source"> + onclick="toggleCode('M000166-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000166-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/object.rb, line 29</span> +<span class="ruby-comment cmt"># File lib/git/object.rb, line 40</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span> <span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplementedError</span> <span class="ruby-keyword kw">end</span> @@ -311,23 +392,115 @@ </div> </div> - <div id="method-M000140" class="method-detail"> - <a name="M000140"></a> + <div id="method-M000162" class="method-detail"> + <a name="M000162"></a> <div class="method-heading"> - <a href="#M000140" class="method-signature"> + <a href="#M000162" class="method-signature"> + <span class="method-name">sha</span><span class="method-args">()</span> + </a> + </div> + + <div class="method-description"> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000162-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000162-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/object.rb, line 23</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sha</span> + <span class="ruby-ivar">@sha</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@sha</span> = <span class="ruby-ivar">@base</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">revparse</span>(<span class="ruby-ivar">@objectish</span>) + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000163" class="method-detail"> + <a name="M000163"></a> + + <div class="method-heading"> + <a href="#M000163" class="method-signature"> + <span class="method-name">size</span><span class="method-args">()</span> + </a> + </div> + + <div class="method-description"> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000163-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000163-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/object.rb, line 27</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">size</span> + <span class="ruby-ivar">@size</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@size</span> = <span class="ruby-ivar">@base</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">object_size</span>(<span class="ruby-ivar">@objectish</span>) + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000175" class="method-detail"> + <a name="M000175"></a> + + <div class="method-heading"> + <a href="#M000175" class="method-signature"> + <span class="method-name">tag?</span><span class="method-args">()</span> + </a> + </div> + + <div class="method-description"> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000175-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000175-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/object.rb, line 79</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tag?</span> + <span class="ruby-ivar">@type</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'tag'</span> + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000167" class="method-detail"> + <a name="M000167"></a> + + <div class="method-heading"> + <a href="#M000167" class="method-signature"> <span class="method-name">to_s</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000140-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000140-source"> + onclick="toggleCode('M000167-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000167-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/object.rb, line 33</span> +<span class="ruby-comment cmt"># File lib/git/object.rb, line 44</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span> - <span class="ruby-ivar">@sha</span> + <span class="ruby-identifier">sha</span> + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000172" class="method-detail"> + <a name="M000172"></a> + + <div class="method-heading"> + <a href="#M000172" class="method-signature"> + <span class="method-name">tree?</span><span class="method-args">()</span> + </a> + </div> + + <div class="method-description"> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000172-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000172-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/object.rb, line 67</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tree?</span> + <span class="ruby-ivar">@type</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'tree'</span> <span class="ruby-keyword kw">end</span> </pre> </div> diff --git a/doc/classes/Git/Object/Blob.html b/doc/classes/Git/Object/Blob.html index 453a324..bf1551a 100644 --- a/doc/classes/Git/Object/Blob.html +++ b/doc/classes/Git/Object/Blob.html @@ -88,7 +88,7 @@ <h3 class="section-bar">Methods</h3> <div class="name-list"> - <a href="#M000145">new</a> + <a href="#M000177">new</a> </div> </div> @@ -110,21 +110,21 @@ <div id="methods"> <h3 class="section-bar">Public Class methods</h3> - <div id="method-M000145" class="method-detail"> - <a name="M000145"></a> + <div id="method-M000177" class="method-detail"> + <a name="M000177"></a> <div class="method-heading"> - <a href="#M000145" class="method-signature"> + <a href="#M000177" class="method-signature"> <span class="method-name">new</span><span class="method-args">(base, sha, mode = nil)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000145-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000145-source"> + onclick="toggleCode('M000177-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000177-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/object.rb, line 56</span> +<span class="ruby-comment cmt"># File lib/git/object.rb, line 88</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">base</span>, <span class="ruby-identifier">sha</span>, <span class="ruby-identifier">mode</span> = <span class="ruby-keyword kw">nil</span>) <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">base</span>, <span class="ruby-identifier">sha</span>) <span class="ruby-ivar">@mode</span> = <span class="ruby-identifier">mode</span> diff --git a/doc/classes/Git/Object/Commit.html b/doc/classes/Git/Object/Commit.html index 3be4f27..5e8e7bb 100644 --- a/doc/classes/Git/Object/Commit.html +++ b/doc/classes/Git/Object/Commit.html @@ -88,16 +88,17 @@ <h3 class="section-bar">Methods</h3> <div class="name-list"> - <a href="#M000130">author</a> - <a href="#M000131">author_date</a> - <a href="#M000132">committer</a> - <a href="#M000133">committer_date</a> - <a href="#M000134">date</a> - <a href="#M000135">diff_parent</a> - <a href="#M000127">gtree</a> - <a href="#M000126">message</a> - <a href="#M000128">parent</a> - <a href="#M000129">parents</a> + <a href="#M000155">author</a> + <a href="#M000156">author_date</a> + <a href="#M000157">committer</a> + <a href="#M000158">committer_date</a> + <a href="#M000159">date</a> + <a href="#M000160">diff_parent</a> + <a href="#M000152">gtree</a> + <a href="#M000150">message</a> + <a href="#M000151">name</a> + <a href="#M000153">parent</a> + <a href="#M000154">parents</a> </div> </div> @@ -119,11 +120,11 @@ <div id="methods"> <h3 class="section-bar">Public Instance methods</h3> - <div id="method-M000130" class="method-detail"> - <a name="M000130"></a> + <div id="method-M000155" class="method-detail"> + <a name="M000155"></a> <div class="method-heading"> - <a href="#M000130" class="method-signature"> + <a href="#M000155" class="method-signature"> <span class="method-name">author</span><span class="method-args">()</span> </a> </div> @@ -133,10 +134,10 @@ git author </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000130-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000130-source"> + onclick="toggleCode('M000155-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000155-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/object.rb, line 143</span> +<span class="ruby-comment cmt"># File lib/git/object.rb, line 179</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">author</span> <span class="ruby-identifier">check_commit</span> <span class="ruby-ivar">@author</span> @@ -146,21 +147,21 @@ git author </div> </div> - <div id="method-M000131" class="method-detail"> - <a name="M000131"></a> + <div id="method-M000156" class="method-detail"> + <a name="M000156"></a> <div class="method-heading"> - <a href="#M000131" class="method-signature"> + <a href="#M000156" class="method-signature"> <span class="method-name">author_date</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000131-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000131-source"> + onclick="toggleCode('M000156-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000156-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/object.rb, line 148</span> +<span class="ruby-comment cmt"># File lib/git/object.rb, line 184</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">author_date</span> <span class="ruby-identifier">author</span>.<span class="ruby-identifier">date</span> <span class="ruby-keyword kw">end</span> @@ -169,11 +170,11 @@ git author </div> </div> - <div id="method-M000132" class="method-detail"> - <a name="M000132"></a> + <div id="method-M000157" class="method-detail"> + <a name="M000157"></a> <div class="method-heading"> - <a href="#M000132" class="method-signature"> + <a href="#M000157" class="method-signature"> <span class="method-name">committer</span><span class="method-args">()</span> </a> </div> @@ -183,10 +184,10 @@ git author git author </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000132-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000132-source"> + onclick="toggleCode('M000157-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000157-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/object.rb, line 153</span> +<span class="ruby-comment cmt"># File lib/git/object.rb, line 189</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">committer</span> <span class="ruby-identifier">check_commit</span> <span class="ruby-ivar">@committer</span> @@ -196,21 +197,21 @@ git author </div> </div> - <div id="method-M000133" class="method-detail"> - <a name="M000133"></a> + <div id="method-M000158" class="method-detail"> + <a name="M000158"></a> <div class="method-heading"> - <a href="#M000133" class="method-signature"> + <a href="#M000158" class="method-signature"> <span class="method-name">committer_date</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000133-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000133-source"> + onclick="toggleCode('M000158-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000158-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/object.rb, line 158</span> +<span class="ruby-comment cmt"># File lib/git/object.rb, line 194</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">committer_date</span> <span class="ruby-identifier">committer</span>.<span class="ruby-identifier">date</span> <span class="ruby-keyword kw">end</span> @@ -219,8 +220,8 @@ git author </div> </div> - <div id="method-M000134" class="method-detail"> - <a name="M000134"></a> + <div id="method-M000159" class="method-detail"> + <a name="M000159"></a> <div class="method-heading"> <span class="method-name">date</span><span class="method-args">()</span> @@ -228,26 +229,26 @@ git author <div class="method-description"> <p> -Alias for <a href="Commit.html#M000133">committer_date</a> +Alias for <a href="Commit.html#M000158">committer_date</a> </p> </div> </div> - <div id="method-M000135" class="method-detail"> - <a name="M000135"></a> + <div id="method-M000160" class="method-detail"> + <a name="M000160"></a> <div class="method-heading"> - <a href="#M000135" class="method-signature"> + <a href="#M000160" class="method-signature"> <span class="method-name">diff_parent</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000135-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000135-source"> + onclick="toggleCode('M000160-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000160-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/object.rb, line 163</span> +<span class="ruby-comment cmt"># File lib/git/object.rb, line 199</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">diff_parent</span> <span class="ruby-identifier">diff</span>(<span class="ruby-identifier">parent</span>) <span class="ruby-keyword kw">end</span> @@ -256,21 +257,21 @@ Alias for <a href="Commit.html#M000133">committer_date</a> </div> </div> - <div id="method-M000127" class="method-detail"> - <a name="M000127"></a> + <div id="method-M000152" class="method-detail"> + <a name="M000152"></a> <div class="method-heading"> - <a href="#M000127" class="method-signature"> + <a href="#M000152" class="method-signature"> <span class="method-name">gtree</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000127-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000127-source"> + onclick="toggleCode('M000152-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000152-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/object.rb, line 127</span> +<span class="ruby-comment cmt"># File lib/git/object.rb, line 163</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">gtree</span> <span class="ruby-identifier">check_commit</span> <span class="ruby-constant">Tree</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@base</span>, <span class="ruby-ivar">@tree</span>) @@ -280,21 +281,21 @@ Alias for <a href="Commit.html#M000133">committer_date</a> </div> </div> - <div id="method-M000126" class="method-detail"> - <a name="M000126"></a> + <div id="method-M000150" class="method-detail"> + <a name="M000150"></a> <div class="method-heading"> - <a href="#M000126" class="method-signature"> + <a href="#M000150" class="method-signature"> <span class="method-name">message</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000126-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000126-source"> + onclick="toggleCode('M000150-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000150-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/object.rb, line 122</span> +<span class="ruby-comment cmt"># File lib/git/object.rb, line 154</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">message</span> <span class="ruby-identifier">check_commit</span> <span class="ruby-ivar">@message</span> @@ -304,21 +305,44 @@ Alias for <a href="Commit.html#M000133">committer_date</a> </div> </div> - <div id="method-M000128" class="method-detail"> - <a name="M000128"></a> + <div id="method-M000151" class="method-detail"> + <a name="M000151"></a> + + <div class="method-heading"> + <a href="#M000151" class="method-signature"> + <span class="method-name">name</span><span class="method-args">()</span> + </a> + </div> + + <div class="method-description"> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000151-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000151-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/object.rb, line 159</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">name</span> + <span class="ruby-ivar">@base</span>.<span class="ruby-identifier">lib</span>.<span class="ruby-identifier">namerev</span>(<span class="ruby-identifier">sha</span>) + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000153" class="method-detail"> + <a name="M000153"></a> <div class="method-heading"> - <a href="#M000128" class="method-signature"> + <a href="#M000153" class="method-signature"> <span class="method-name">parent</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000128-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000128-source"> + onclick="toggleCode('M000153-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000153-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/object.rb, line 132</span> +<span class="ruby-comment cmt"># File lib/git/object.rb, line 168</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parent</span> <span class="ruby-identifier">parents</span>.<span class="ruby-identifier">first</span> <span class="ruby-keyword kw">end</span> @@ -327,11 +351,11 @@ Alias for <a href="Commit.html#M000133">committer_date</a> </div> </div> - <div id="method-M000129" class="method-detail"> - <a name="M000129"></a> + <div id="method-M000154" class="method-detail"> + <a name="M000154"></a> <div class="method-heading"> - <a href="#M000129" class="method-signature"> + <a href="#M000154" class="method-signature"> <span class="method-name">parents</span><span class="method-args">()</span> </a> </div> @@ -341,10 +365,10 @@ Alias for <a href="Commit.html#M000133">committer_date</a> array of all parent commits </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000129-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000129-source"> + onclick="toggleCode('M000154-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000154-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/object.rb, line 137</span> +<span class="ruby-comment cmt"># File lib/git/object.rb, line 173</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parents</span> <span class="ruby-identifier">check_commit</span> <span class="ruby-ivar">@parents</span> diff --git a/doc/classes/Git/Object/Tag.html b/doc/classes/Git/Object/Tag.html index 799baaa..309aa0f 100644 --- a/doc/classes/Git/Object/Tag.html +++ b/doc/classes/Git/Object/Tag.html @@ -88,7 +88,7 @@ <h3 class="section-bar">Methods</h3> <div class="name-list"> - <a href="#M000144">new</a> + <a href="#M000176">new</a> </div> </div> @@ -123,21 +123,21 @@ <div id="methods"> <h3 class="section-bar">Public Class methods</h3> - <div id="method-M000144" class="method-detail"> - <a name="M000144"></a> + <div id="method-M000176" class="method-detail"> + <a name="M000176"></a> <div class="method-heading"> - <a href="#M000144" class="method-signature"> + <a href="#M000176" class="method-signature"> <span class="method-name">new</span><span class="method-args">(base, sha, name)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000144-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000144-source"> + onclick="toggleCode('M000176-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000176-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/object.rb, line 190</span> +<span class="ruby-comment cmt"># File lib/git/object.rb, line 226</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">base</span>, <span class="ruby-identifier">sha</span>, <span class="ruby-identifier">name</span>) <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">base</span>, <span class="ruby-identifier">sha</span>) <span class="ruby-ivar">@name</span> = <span class="ruby-identifier">name</span> diff --git a/doc/classes/Git/Object/Tree.html b/doc/classes/Git/Object/Tree.html index 72a8a61..d21bc9e 100644 --- a/doc/classes/Git/Object/Tree.html +++ b/doc/classes/Git/Object/Tree.html @@ -88,13 +88,13 @@ <h3 class="section-bar">Methods</h3> <div class="name-list"> - <a href="#M000148">blobs</a> - <a href="#M000147">children</a> - <a href="#M000149">files</a> - <a href="#M000146">new</a> - <a href="#M000152">subdirectories</a> - <a href="#M000151">subtrees</a> - <a href="#M000150">trees</a> + <a href="#M000180">blobs</a> + <a href="#M000179">children</a> + <a href="#M000181">files</a> + <a href="#M000178">new</a> + <a href="#M000184">subdirectories</a> + <a href="#M000183">subtrees</a> + <a href="#M000182">trees</a> </div> </div> @@ -116,21 +116,21 @@ <div id="methods"> <h3 class="section-bar">Public Class methods</h3> - <div id="method-M000146" class="method-detail"> - <a name="M000146"></a> + <div id="method-M000178" class="method-detail"> + <a name="M000178"></a> <div class="method-heading"> - <a href="#M000146" class="method-signature"> + <a href="#M000178" class="method-signature"> <span class="method-name">new</span><span class="method-args">(base, sha, mode = nil)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000146-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000146-source"> + onclick="toggleCode('M000178-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000178-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/object.rb, line 73</span> +<span class="ruby-comment cmt"># File lib/git/object.rb, line 105</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">base</span>, <span class="ruby-identifier">sha</span>, <span class="ruby-identifier">mode</span> = <span class="ruby-keyword kw">nil</span>) <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">base</span>, <span class="ruby-identifier">sha</span>) <span class="ruby-ivar">@mode</span> = <span class="ruby-identifier">mode</span> @@ -142,21 +142,21 @@ <h3 class="section-bar">Public Instance methods</h3> - <div id="method-M000148" class="method-detail"> - <a name="M000148"></a> + <div id="method-M000180" class="method-detail"> + <a name="M000180"></a> <div class="method-heading"> - <a href="#M000148" class="method-signature"> + <a href="#M000180" class="method-signature"> <span class="method-name">blobs</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000148-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000148-source"> + onclick="toggleCode('M000180-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000180-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/object.rb, line 82</span> +<span class="ruby-comment cmt"># File lib/git/object.rb, line 114</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">blobs</span> <span class="ruby-identifier">check_tree</span> <span class="ruby-ivar">@blobs</span> @@ -166,21 +166,21 @@ </div> </div> - <div id="method-M000147" class="method-detail"> - <a name="M000147"></a> + <div id="method-M000179" class="method-detail"> + <a name="M000179"></a> <div class="method-heading"> - <a href="#M000147" class="method-signature"> + <a href="#M000179" class="method-signature"> <span class="method-name">children</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000147-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000147-source"> + onclick="toggleCode('M000179-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000179-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/object.rb, line 78</span> +<span class="ruby-comment cmt"># File lib/git/object.rb, line 110</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">children</span> <span class="ruby-identifier">blobs</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">subtrees</span>) <span class="ruby-keyword kw">end</span> @@ -189,8 +189,8 @@ </div> </div> - <div id="method-M000149" class="method-detail"> - <a name="M000149"></a> + <div id="method-M000181" class="method-detail"> + <a name="M000181"></a> <div class="method-heading"> <span class="method-name">files</span><span class="method-args">()</span> @@ -198,13 +198,13 @@ <div class="method-description"> <p> -Alias for <a href="Tree.html#M000148">blobs</a> +Alias for <a href="Tree.html#M000180">blobs</a> </p> </div> </div> - <div id="method-M000152" class="method-detail"> - <a name="M000152"></a> + <div id="method-M000184" class="method-detail"> + <a name="M000184"></a> <div class="method-heading"> <span class="method-name">subdirectories</span><span class="method-args">()</span> @@ -212,13 +212,13 @@ Alias for <a href="Tree.html#M000148">blobs</a> <div class="method-description"> <p> -Alias for <a href="Tree.html#M000150">trees</a> +Alias for <a href="Tree.html#M000182">trees</a> </p> </div> </div> - <div id="method-M000151" class="method-detail"> - <a name="M000151"></a> + <div id="method-M000183" class="method-detail"> + <a name="M000183"></a> <div class="method-heading"> <span class="method-name">subtrees</span><span class="method-args">()</span> @@ -226,26 +226,26 @@ Alias for <a href="Tree.html#M000150">trees</a> <div class="method-description"> <p> -Alias for <a href="Tree.html#M000150">trees</a> +Alias for <a href="Tree.html#M000182">trees</a> </p> </div> </div> - <div id="method-M000150" class="method-detail"> - <a name="M000150"></a> + <div id="method-M000182" class="method-detail"> + <a name="M000182"></a> <div class="method-heading"> - <a href="#M000150" class="method-signature"> + <a href="#M000182" class="method-signature"> <span class="method-name">trees</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000150-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000150-source"> + onclick="toggleCode('M000182-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000182-source"> <pre> -<span class="ruby-comment cmt"># File lib/git/object.rb, line 88</span> +<span class="ruby-comment cmt"># File lib/git/object.rb, line 120</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">trees</span> <span class="ruby-identifier">check_tree</span> <span class="ruby-ivar">@trees</span> diff --git a/doc/classes/Git/Path.html b/doc/classes/Git/Path.html index 1f49a3e..5c18b32 100644 --- a/doc/classes/Git/Path.html +++ b/doc/classes/Git/Path.html @@ -88,9 +88,10 @@ <h3 class="section-bar">Methods</h3> <div class="name-list"> - <a href="#M000122">new</a> - <a href="#M000123">readable?</a> - <a href="#M000124">writable?</a> + <a href="#M000145">new</a> + <a href="#M000146">readable?</a> + <a href="#M000148">to_s</a> + <a href="#M000147">writable?</a> </div> </div> @@ -125,19 +126,19 @@ <div id="methods"> <h3 class="section-bar">Public Class methods</h3> - <div id="method-M000122" class="method-detail"> - <a name="M000122"></a> + <div id="method-M000145" class="method-detail"> + <a name="M000145"></a> <div class="method-heading"> - <a href="#M000122" class="method-signature"> + <a href="#M000145" class="method-signature"> <span class="method-name">new</span><span class="method-args">(path, check_path = true)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000122-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000122-source"> + onclick="toggleCode('M000145-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000145-source"> <pre> <span class="ruby-comment cmt"># File lib/git/path.rb, line 6</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">check_path</span> = <span class="ruby-keyword kw">true</span>) @@ -154,19 +155,19 @@ <h3 class="section-bar">Public Instance methods</h3> - <div id="method-M000123" class="method-detail"> - <a name="M000123"></a> + <div id="method-M000146" class="method-detail"> + <a name="M000146"></a> <div class="method-heading"> - <a href="#M000123" class="method-signature"> + <a href="#M000146" class="method-signature"> <span class="method-name">readable?</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000123-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000123-source"> + onclick="toggleCode('M000146-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000146-source"> <pre> <span class="ruby-comment cmt"># File lib/git/path.rb, line 14</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">readable?</span> @@ -177,19 +178,42 @@ </div> </div> - <div id="method-M000124" class="method-detail"> - <a name="M000124"></a> + <div id="method-M000148" class="method-detail"> + <a name="M000148"></a> <div class="method-heading"> - <a href="#M000124" class="method-signature"> + <a href="#M000148" class="method-signature"> + <span class="method-name">to_s</span><span class="method-args">()</span> + </a> + </div> + + <div class="method-description"> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000148-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000148-source"> +<pre> +<span class="ruby-comment cmt"># File lib/git/path.rb, line 22</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span> + <span class="ruby-ivar">@path</span> + <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000147" class="method-detail"> + <a name="M000147"></a> + + <div class="method-heading"> + <a href="#M000147" class="method-signature"> <span class="method-name">writable?</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000124-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000124-source"> + onclick="toggleCode('M000147-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000147-source"> <pre> <span class="ruby-comment cmt"># File lib/git/path.rb, line 18</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">writable?</span> diff --git a/doc/classes/Git/Remote.html b/doc/classes/Git/Remote.html index ebe825f..7c3c2e6 100644 --- a/doc/classes/Git/Remote.html +++ b/doc/classes/Git/Remote.html @@ -88,13 +88,13 @@ <h3 class="section-bar">Methods</h3> <div class="name-list"> - <a href="#M000170">branch</a> - <a href="#M000168">fetch</a> - <a href="#M000169">merge</a> - <a href="#M000166">new</a> - <a href="#M000167">remove</a> - <a href="#M000171">remove</a> - <a href="#M000172">to_s</a> + <a href="#M000202">branch</a> + <a href="#M000200">fetch</a> + <a href="#M000201">merge</a> + <a href="#M000198">new</a> + <a href="#M000199">remove</a> + <a href="#M000203">remove</a> + <a href="#M000204">to_s</a> </div> </div> @@ -139,19 +139,19 @@ <div id="methods"> <h3 class="section-bar">Public Class methods</h3> - <div id="method-M000166" class="method-detail"> - <a name="M000166"></a> + <div id="method-M000198" class="method-detail"> + <a name="M000198"></a> <div class="method-heading"> - <a href="#M000166" class="method-signature"> + <a href="#M000198" class="method-signature"> <span class="method-name">new</span><span class="method-args">(base, name)</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000166-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000166-source"> + onclick="toggleCode('M000198-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000198-source"> <pre> <span class="ruby-comment cmt"># File lib/git/remote.rb, line 8</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">base</span>, <span class="ruby-identifier">name</span>) @@ -168,19 +168,19 @@ <h3 class="section-bar">Public Instance methods</h3> - <div id="method-M000170" class="method-detail"> - <a name="M000170"></a> + <div id="method-M000202" class="method-detail"> + <a name="M000202"></a> <div class="method-heading"> - <a href="#M000170" class="method-signature"> + <a href="#M000202" class="method-signature"> <span class="method-name">branch</span><span class="method-args">(branch = 'master')</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000170-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000170-source"> + onclick="toggleCode('M000202-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000202-source"> <pre> <span class="ruby-comment cmt"># File lib/git/remote.rb, line 29</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">branch</span>(<span class="ruby-identifier">branch</span> = <span class="ruby-value str">'master'</span>) @@ -191,19 +191,19 @@ </div> </div> - <div id="method-M000168" class="method-detail"> - <a name="M000168"></a> + <div id="method-M000200" class="method-detail"> + <a name="M000200"></a> <div class="method-heading"> - <a href="#M000168" class="method-signature"> + <a href="#M000200" class="method-signature"> <span class="method-name">fetch</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000168-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000168-source"> + onclick="toggleCode('M000200-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000200-source"> <pre> <span class="ruby-comment cmt"># File lib/git/remote.rb, line 20</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fetch</span> @@ -214,11 +214,11 @@ </div> </div> - <div id="method-M000169" class="method-detail"> - <a name="M000169"></a> + <div id="method-M000201" class="method-detail"> + <a name="M000201"></a> <div class="method-heading"> - <a href="#M000169" class="method-signature"> + <a href="#M000201" class="method-signature"> <span class="method-name">merge</span><span class="method-args">(branch = 'master')</span> </a> </div> @@ -228,8 +228,8 @@ merge this remote locally </p> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000169-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000169-source"> + onclick="toggleCode('M000201-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000201-source"> <pre> <span class="ruby-comment cmt"># File lib/git/remote.rb, line 25</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">merge</span>(<span class="ruby-identifier">branch</span> = <span class="ruby-value str">'master'</span>) @@ -240,19 +240,19 @@ merge this remote locally </div> </div> - <div id="method-M000167" class="method-detail"> - <a name="M000167"></a> + <div id="method-M000199" class="method-detail"> + <a name="M000199"></a> <div class="method-heading"> - <a href="#M000167" class="method-signature"> + <a href="#M000199" class="method-signature"> <span class="method-name">remove</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000167-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000167-source"> + onclick="toggleCode('M000199-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000199-source"> <pre> <span class="ruby-comment cmt"># File lib/git/remote.rb, line 16</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove</span> @@ -263,19 +263,19 @@ merge this remote locally </div> </div> - <div id="method-M000171" class="method-detail"> - <a name="M000171"></a> + <div id="method-M000203" class="method-detail"> + <a name="M000203"></a> <div class="method-heading"> - <a href="#M000171" class="method-signature"> + <a href="#M000203" class="method-signature"> <span class="method-name">remove</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000171-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000171-source"> + onclick="toggleCode('M000203-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000203-source"> <pre> <span class="ruby-comment cmt"># File lib/git/remote.rb, line 33</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove</span> @@ -286,19 +286,19 @@ merge this remote locally </div> </div> - <div id="method-M000172" class="method-detail"> - <a name="M000172"></a> + <div id="method-M000204" class="method-detail"> + <a name="M000204"></a> <div class="method-heading"> - <a href="#M000172" class="method-signature"> + <a href="#M000204" class="method-signature"> <span class="method-name">to_s</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p><a class="source-toggle" href="#" - onclick="toggleCode('M000172-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000172-source"> + onclick="toggleCode('M000204-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000204-source"> <pre> <span class="ruby-comment cmt"># File lib/git/remote.rb, line 37</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span> diff --git a/doc/created.rid b/doc/created.rid index c9a65f9..f785fc6 100644 --- a/doc/created.rid +++ b/doc/created.rid @@ -1 +1 @@ -Tue Nov 13 08:54:42 PST 2007 +Fri Nov 16 12:12:50 PST 2007 diff --git a/doc/files/README.html b/doc/files/README.html index 69d8471..8776a1a 100644 --- a/doc/files/README.html +++ b/doc/files/README.html @@ -56,7 +56,7 @@ </tr> <tr class="top-aligned-row"> <td><strong>Last Update:</strong></td> - <td>Tue Nov 13 08:54:36 PST 2007</td> + <td>Fri Nov 16 11:43:31 PST 2007</td> </tr> </table> </div> @@ -305,6 +305,46 @@ And here are the operations that will need to write to your git repository. g.push g.push(g.remote('name')) </pre> +<p> +Some examples of more low-level index and tree operations +</p> +<pre> + g.with_temp_index do + + g.read_tree(tree3) # calls self.index.read_tree + g.read_tree(tree1, :prefix => 'hi/') + + c = g.commit_tree('message') + # or # + t = g.write_tree + c = g.commit_tree(t, :message => 'message', :parents => [sha1, sha2]) + + g.branch('branch_name').update_ref(c) + g.update_ref(branch, c) + + g.with_temp_working do # new blank working directory + g.checkout + g.checkout(another_index) + g.commit # commits to temp_index + end + end + + g.set_index('/path/to/index') + + g.with_index(path) do + # calls set_index, then switches back after + end + + g.with_working(dir) do + # calls set_working, then switches back after + end + + g.with_temp_working(dir) do + g.checkout_index(:prefix => dir, :path_limiter => path) + # do file work + g.commit # commits to index + end +</pre> </div> diff --git a/doc/files/lib/git/base_rb.html b/doc/files/lib/git/base_rb.html index b88352c..ac94e28 100644 --- a/doc/files/lib/git/base_rb.html +++ b/doc/files/lib/git/base_rb.html @@ -56,7 +56,7 @@ </tr> <tr class="top-aligned-row"> <td><strong>Last Update:</strong></td> - <td>Tue Nov 13 07:35:24 PST 2007</td> + <td>Fri Nov 16 11:38:17 PST 2007</td> </tr> </table> </div> diff --git a/doc/files/lib/git/branch_rb.html b/doc/files/lib/git/branch_rb.html index 2c79e83..6ad83e0 100644 --- a/doc/files/lib/git/branch_rb.html +++ b/doc/files/lib/git/branch_rb.html @@ -56,7 +56,7 @@ </tr> <tr class="top-aligned-row"> <td><strong>Last Update:</strong></td> - <td>Sun Nov 11 17:19:18 PST 2007</td> + <td>Fri Nov 16 11:34:13 PST 2007</td> </tr> </table> </div> diff --git a/doc/files/lib/git/index_rb.html b/doc/files/lib/git/index_rb.html index c4d1cfa..d940a8b 100644 --- a/doc/files/lib/git/index_rb.html +++ b/doc/files/lib/git/index_rb.html @@ -56,7 +56,7 @@ </tr> <tr class="top-aligned-row"> <td><strong>Last Update:</strong></td> - <td>Wed Nov 07 15:40:20 PST 2007</td> + <td>Fri Nov 16 11:34:13 PST 2007</td> </tr> </table> </div> diff --git a/doc/files/lib/git/lib_rb.html b/doc/files/lib/git/lib_rb.html index 2462126..880a478 100644 --- a/doc/files/lib/git/lib_rb.html +++ b/doc/files/lib/git/lib_rb.html @@ -56,7 +56,7 @@ </tr> <tr class="top-aligned-row"> <td><strong>Last Update:</strong></td> - <td>Mon Nov 12 17:40:54 PST 2007</td> + <td>Fri Nov 16 11:42:13 PST 2007</td> </tr> </table> </div> @@ -69,6 +69,13 @@ <div id="contextContent"> + <div id="requires-list"> + <h3 class="section-bar">Required files</h3> + + <div class="name-list"> + tempfile + </div> + </div> </div> diff --git a/doc/files/lib/git/object_rb.html b/doc/files/lib/git/object_rb.html index b1cfe7d..6493bfe 100644 --- a/doc/files/lib/git/object_rb.html +++ b/doc/files/lib/git/object_rb.html @@ -56,7 +56,7 @@ </tr> <tr class="top-aligned-row"> <td><strong>Last Update:</strong></td> - <td>Tue Nov 13 06:37:18 PST 2007</td> + <td>Thu Nov 15 17:08:18 PST 2007</td> </tr> </table> </div> diff --git a/doc/files/lib/git/path_rb.html b/doc/files/lib/git/path_rb.html index edc7fbf..f575d7a 100644 --- a/doc/files/lib/git/path_rb.html +++ b/doc/files/lib/git/path_rb.html @@ -56,7 +56,7 @@ </tr> <tr class="top-aligned-row"> <td><strong>Last Update:</strong></td> - <td>Sat Nov 10 15:17:16 PST 2007</td> + <td>Fri Nov 16 11:34:13 PST 2007</td> </tr> </table> </div> diff --git a/doc/files/lib/git_rb.html b/doc/files/lib/git_rb.html index 192691a..7fac2e8 100644 --- a/doc/files/lib/git_rb.html +++ b/doc/files/lib/git_rb.html @@ -56,7 +56,7 @@ </tr> <tr class="top-aligned-row"> <td><strong>Last Update:</strong></td> - <td>Tue Nov 13 07:04:48 PST 2007</td> + <td>Fri Nov 16 11:34:13 PST 2007</td> </tr> </table> </div> diff --git a/doc/fr_method_index.html b/doc/fr_method_index.html index 1c86105..6bb821e 100644 --- a/doc/fr_method_index.html +++ b/doc/fr_method_index.html @@ -21,177 +21,209 @@ <h1 class="section-bar">Methods</h1> <div id="index-entries"> <a href="classes/Git/Status.html#M000011">[] (Git::Status)</a><br /> - <a href="classes/Git/Branches.html#M000069">[] (Git::Branches)</a><br /> - <a href="classes/Git/Diff.html#M000162">[] (Git::Diff)</a><br /> - <a href="classes/Git/Base.html#M000103">add (Git::Base)</a><br /> - <a href="classes/Git/Lib.html#M000047">add (Git::Lib)</a><br /> - <a href="classes/Git/Base.html#M000115">add_remote (Git::Base)</a><br /> - <a href="classes/Git/Base.html#M000118">add_tag (Git::Base)</a><br /> + <a href="classes/Git/Branches.html#M000076">[] (Git::Branches)</a><br /> + <a href="classes/Git/Diff.html#M000194">[] (Git::Diff)</a><br /> + <a href="classes/Git/Lib.html#M000048">add (Git::Lib)</a><br /> + <a href="classes/Git/Base.html#M000114">add (Git::Base)</a><br /> + <a href="classes/Git/Base.html#M000126">add_remote (Git::Base)</a><br /> + <a href="classes/Git/Base.html#M000129">add_tag (Git::Base)</a><br /> <a href="classes/Git/Status.html#M000007">added (Git::Status)</a><br /> - <a href="classes/Git/Object/Commit.html#M000130">author (Git::Object::Commit)</a><br /> - <a href="classes/Git/Object/Commit.html#M000131">author_date (Git::Object::Commit)</a><br /> - <a href="classes/Git/Base.html#M000080">bare (Git::Base)</a><br /> + <a href="classes/Git/Object/AbstractObject.html#M000171">archive (Git::Object::AbstractObject)</a><br /> + <a href="classes/Git/Branch.html#M000080">archive (Git::Branch)</a><br /> + <a href="classes/Git/Lib.html#M000070">archive (Git::Lib)</a><br /> + <a href="classes/Git/Base.html#M000130">archive (Git::Base)</a><br /> + <a href="classes/Git/Object/Commit.html#M000155">author (Git::Object::Commit)</a><br /> + <a href="classes/Git/Object/Commit.html#M000156">author_date (Git::Object::Commit)</a><br /> <a href="classes/Git.html#M000001">bare (Git)</a><br /> + <a href="classes/Git/Base.html#M000089">bare (Git::Base)</a><br /> <a href="classes/Git/Log.html#M000019">between (Git::Log)</a><br /> + <a href="classes/Git/Diff/DiffFile.html#M000197">blob (Git::Diff::DiffFile)</a><br /> <a href="classes/Git/Status/StatusFile.html#M000014">blob (Git::Status::StatusFile)</a><br /> - <a href="classes/Git/Diff/DiffFile.html#M000165">blob (Git::Diff::DiffFile)</a><br /> - <a href="classes/Git/Object/Tree.html#M000148">blobs (Git::Object::Tree)</a><br /> - <a href="classes/Git/Remote.html#M000170">branch (Git::Remote)</a><br /> - <a href="classes/Git/Base.html#M000098">branch (Git::Base)</a><br /> - <a href="classes/Git/Lib.html#M000036">branch_current (Git::Lib)</a><br /> - <a href="classes/Git/Lib.html#M000052">branch_delete (Git::Lib)</a><br /> - <a href="classes/Git/Lib.html#M000051">branch_new (Git::Lib)</a><br /> - <a href="classes/Git/Base.html#M000097">branches (Git::Base)</a><br /> - <a href="classes/Git/Lib.html#M000035">branches_all (Git::Lib)</a><br /> + <a href="classes/Git/Object/AbstractObject.html#M000173">blob? (Git::Object::AbstractObject)</a><br /> + <a href="classes/Git/Object/Tree.html#M000180">blobs (Git::Object::Tree)</a><br /> + <a href="classes/Git/Base.html#M000109">branch (Git::Base)</a><br /> + <a href="classes/Git/Remote.html#M000202">branch (Git::Remote)</a><br /> + <a href="classes/Git/Lib.html#M000037">branch_current (Git::Lib)</a><br /> + <a href="classes/Git/Lib.html#M000053">branch_delete (Git::Lib)</a><br /> + <a href="classes/Git/Lib.html#M000052">branch_new (Git::Lib)</a><br /> + <a href="classes/Git/Base.html#M000108">branches (Git::Base)</a><br /> + <a href="classes/Git/Lib.html#M000036">branches_all (Git::Lib)</a><br /> <a href="classes/Git/Status.html#M000006">changed (Git::Status)</a><br /> - <a href="classes/Git/Base.html#M000088">chdir (Git::Base)</a><br /> - <a href="classes/Git/Lib.html#M000053">checkout (Git::Lib)</a><br /> - <a href="classes/Git/Branch.html#M000072">checkout (Git::Branch)</a><br /> - <a href="classes/Git/Base.html#M000109">checkout (Git::Base)</a><br /> - <a href="classes/Git/Object/Tree.html#M000147">children (Git::Object::Tree)</a><br /> + <a href="classes/Git/Base.html#M000099">chdir (Git::Base)</a><br /> + <a href="classes/Git/Lib.html#M000054">checkout (Git::Lib)</a><br /> + <a href="classes/Git/Branch.html#M000079">checkout (Git::Branch)</a><br /> + <a href="classes/Git/Base.html#M000120">checkout (Git::Base)</a><br /> + <a href="classes/Git/Lib.html#M000069">checkout_index (Git::Lib)</a><br /> + <a href="classes/Git/Base.html#M000134">checkout_index (Git::Base)</a><br /> + <a href="classes/Git/Object/Tree.html#M000179">children (Git::Object::Tree)</a><br /> <a href="classes/Git/Lib.html#M000027">clone (Git::Lib)</a><br /> - <a href="classes/Git/Base.html#M000083">clone (Git::Base)</a><br /> <a href="classes/Git.html#M000004">clone (Git)</a><br /> - <a href="classes/Git/Base.html#M000107">commit (Git::Base)</a><br /> - <a href="classes/Git/Lib.html#M000049">commit (Git::Lib)</a><br /> - <a href="classes/Git/Base.html#M000108">commit_all (Git::Base)</a><br /> - <a href="classes/Git/Lib.html#M000032">commit_data (Git::Lib)</a><br /> - <a href="classes/Git/Object/Commit.html#M000132">committer (Git::Object::Commit)</a><br /> - <a href="classes/Git/Object/Commit.html#M000133">committer_date (Git::Object::Commit)</a><br /> - <a href="classes/Git/Base.html#M000090">config (Git::Base)</a><br /> - <a href="classes/Git/Lib.html#M000044">config_get (Git::Lib)</a><br /> - <a href="classes/Git/Lib.html#M000045">config_list (Git::Lib)</a><br /> - <a href="classes/Git/Lib.html#M000043">config_remote (Git::Lib)</a><br /> - <a href="classes/Git/Lib.html#M000046">config_set (Git::Lib)</a><br /> - <a href="classes/Git/Object/AbstractObject.html#M000137">contents (Git::Object::AbstractObject)</a><br /> - <a href="classes/Git/Object/AbstractObject.html#M000138">contents_array (Git::Object::AbstractObject)</a><br /> - <a href="classes/Git/Branch.html#M000074">create (Git::Branch)</a><br /> - <a href="classes/Git/Branch.html#M000076">current (Git::Branch)</a><br /> - <a href="classes/Git/Base.html#M000121">current_branch (Git::Base)</a><br /> - <a href="classes/Git/Object/Commit.html#M000134">date (Git::Object::Commit)</a><br /> - <a href="classes/Git/Branch.html#M000075">delete (Git::Branch)</a><br /> + <a href="classes/Git/Base.html#M000092">clone (Git::Base)</a><br /> + <a href="classes/Git/Base.html#M000118">commit (Git::Base)</a><br /> + <a href="classes/Git/Lib.html#M000050">commit (Git::Lib)</a><br /> + <a href="classes/Git/Object/AbstractObject.html#M000174">commit? (Git::Object::AbstractObject)</a><br /> + <a href="classes/Git/Base.html#M000119">commit_all (Git::Base)</a><br /> + <a href="classes/Git/Lib.html#M000033">commit_data (Git::Lib)</a><br /> + <a href="classes/Git/Base.html#M000137">commit_tree (Git::Base)</a><br /> + <a href="classes/Git/Lib.html#M000067">commit_tree (Git::Lib)</a><br /> + <a href="classes/Git/Object/Commit.html#M000157">committer (Git::Object::Commit)</a><br /> + <a href="classes/Git/Object/Commit.html#M000158">committer_date (Git::Object::Commit)</a><br /> + <a href="classes/Git/Base.html#M000101">config (Git::Base)</a><br /> + <a href="classes/Git/Lib.html#M000045">config_get (Git::Lib)</a><br /> + <a href="classes/Git/Lib.html#M000046">config_list (Git::Lib)</a><br /> + <a href="classes/Git/Lib.html#M000044">config_remote (Git::Lib)</a><br /> + <a href="classes/Git/Lib.html#M000047">config_set (Git::Lib)</a><br /> + <a href="classes/Git/Object/AbstractObject.html#M000164">contents (Git::Object::AbstractObject)</a><br /> + <a href="classes/Git/Object/AbstractObject.html#M000165">contents_array (Git::Object::AbstractObject)</a><br /> + <a href="classes/Git/Branch.html#M000082">create (Git::Branch)</a><br /> + <a href="classes/Git/Branch.html#M000084">current (Git::Branch)</a><br /> + <a href="classes/Git/Base.html#M000144">current_branch (Git::Base)</a><br /> + <a href="classes/Git/Object/Commit.html#M000159">date (Git::Object::Commit)</a><br /> + <a href="classes/Git/Branch.html#M000083">delete (Git::Branch)</a><br /> <a href="classes/Git/Status.html#M000008">deleted (Git::Status)</a><br /> - <a href="classes/Git/Diff.html#M000157">deletions (Git::Diff)</a><br /> - <a href="classes/Git/Object/AbstractObject.html#M000142">diff (Git::Object::AbstractObject)</a><br /> - <a href="classes/Git/Base.html#M000102">diff (Git::Base)</a><br /> - <a href="classes/Git/Lib.html#M000040">diff_files (Git::Lib)</a><br /> - <a href="classes/Git/Lib.html#M000038">diff_full (Git::Lib)</a><br /> - <a href="classes/Git/Lib.html#M000041">diff_index (Git::Lib)</a><br /> - <a href="classes/Git/Object/Commit.html#M000135">diff_parent (Git::Object::Commit)</a><br /> - <a href="classes/Git/Lib.html#M000039">diff_stats (Git::Lib)</a><br /> - <a href="classes/Git/Base.html#M000085">dir (Git::Base)</a><br /> + <a href="classes/Git/Diff.html#M000189">deletions (Git::Diff)</a><br /> + <a href="classes/Git/Object/AbstractObject.html#M000169">diff (Git::Object::AbstractObject)</a><br /> + <a href="classes/Git/Base.html#M000113">diff (Git::Base)</a><br /> + <a href="classes/Git/Lib.html#M000041">diff_files (Git::Lib)</a><br /> + <a href="classes/Git/Lib.html#M000039">diff_full (Git::Lib)</a><br /> + <a href="classes/Git/Lib.html#M000042">diff_index (Git::Lib)</a><br /> + <a href="classes/Git/Object/Commit.html#M000160">diff_parent (Git::Object::Commit)</a><br /> + <a href="classes/Git/Lib.html#M000040">diff_stats (Git::Lib)</a><br /> + <a href="classes/Git/Base.html#M000094">dir (Git::Base)</a><br /> + <a href="classes/Git/Diff.html#M000195">each (Git::Diff)</a><br /> <a href="classes/Git/Log.html#M000022">each (Git::Log)</a><br /> - <a href="classes/Git/Diff.html#M000163">each (Git::Diff)</a><br /> <a href="classes/Git/Status.html#M000012">each (Git::Status)</a><br /> - <a href="classes/Git/Branches.html#M000068">each (Git::Branches)</a><br /> - <a href="classes/Git/Base.html#M000110">fetch (Git::Base)</a><br /> - <a href="classes/Git/Remote.html#M000168">fetch (Git::Remote)</a><br /> - <a href="classes/Git/Lib.html#M000060">fetch (Git::Lib)</a><br /> - <a href="classes/Git/Object/Tree.html#M000149">files (Git::Object::Tree)</a><br /> + <a href="classes/Git/Branches.html#M000075">each (Git::Branches)</a><br /> + <a href="classes/Git/Base.html#M000121">fetch (Git::Base)</a><br /> + <a href="classes/Git/Lib.html#M000061">fetch (Git::Lib)</a><br /> + <a href="classes/Git/Remote.html#M000200">fetch (Git::Remote)</a><br /> + <a href="classes/Git/Object/Tree.html#M000181">files (Git::Object::Tree)</a><br /> <a href="classes/Git/Log.html#M000023">first (Git::Log)</a><br /> - <a href="classes/Git/Base.html#M000094">gblob (Git::Base)</a><br /> - <a href="classes/Git/Branch.html#M000071">gcommit (Git::Branch)</a><br /> - <a href="classes/Git/Base.html#M000093">gcommit (Git::Base)</a><br /> - <a href="classes/Git/Base.html#M000101">grep (Git::Base)</a><br /> - <a href="classes/Git/Lib.html#M000037">grep (Git::Lib)</a><br /> - <a href="classes/Git/Object/AbstractObject.html#M000141">grep (Git::Object::AbstractObject)</a><br /> - <a href="classes/Git/Object/Commit.html#M000127">gtree (Git::Object::Commit)</a><br /> - <a href="classes/Git/Base.html#M000092">gtree (Git::Base)</a><br /> - <a href="classes/Git/Branch.html#M000073">in_branch (Git::Branch)</a><br /> - <a href="classes/Git/Base.html#M000087">index (Git::Base)</a><br /> + <a href="classes/Git/Base.html#M000105">gblob (Git::Base)</a><br /> + <a href="classes/Git/Base.html#M000104">gcommit (Git::Base)</a><br /> + <a href="classes/Git/Branch.html#M000078">gcommit (Git::Branch)</a><br /> + <a href="classes/Git/Base.html#M000112">grep (Git::Base)</a><br /> + <a href="classes/Git/Object/AbstractObject.html#M000168">grep (Git::Object::AbstractObject)</a><br /> + <a href="classes/Git/Lib.html#M000038">grep (Git::Lib)</a><br /> + <a href="classes/Git/Base.html#M000103">gtree (Git::Base)</a><br /> + <a href="classes/Git/Object/Commit.html#M000152">gtree (Git::Object::Commit)</a><br /> + <a href="classes/Git/Branch.html#M000081">in_branch (Git::Branch)</a><br /> + <a href="classes/Git/Base.html#M000096">index (Git::Base)</a><br /> <a href="classes/Git.html#M000003">init (Git)</a><br /> - <a href="classes/Git/Base.html#M000082">init (Git::Base)</a><br /> + <a href="classes/Git/Base.html#M000091">init (Git::Base)</a><br /> <a href="classes/Git/Lib.html#M000026">init (Git::Lib)</a><br /> - <a href="classes/Git/Diff.html#M000158">insertions (Git::Diff)</a><br /> - <a href="classes/Git/Base.html#M000100">lib (Git::Base)</a><br /> - <a href="classes/Git/Diff.html#M000156">lines (Git::Diff)</a><br /> - <a href="classes/Git/Branches.html#M000065">local (Git::Branches)</a><br /> - <a href="classes/Git/Object/AbstractObject.html#M000143">log (Git::Object::AbstractObject)</a><br /> - <a href="classes/Git/Base.html#M000095">log (Git::Base)</a><br /> + <a href="classes/Git/Diff.html#M000190">insertions (Git::Diff)</a><br /> + <a href="classes/Git/Base.html#M000111">lib (Git::Base)</a><br /> + <a href="classes/Git/Diff.html#M000188">lines (Git::Diff)</a><br /> + <a href="classes/Git/Branches.html#M000072">local (Git::Branches)</a><br /> + <a href="classes/Git/Base.html#M000106">log (Git::Base)</a><br /> + <a href="classes/Git/Object/AbstractObject.html#M000170">log (Git::Object::AbstractObject)</a><br /> <a href="classes/Git/Lib.html#M000028">log_commits (Git::Lib)</a><br /> - <a href="classes/Git/Lib.html#M000042">ls_files (Git::Lib)</a><br /> - <a href="classes/Git/Lib.html#M000034">ls_tree (Git::Lib)</a><br /> - <a href="classes/Git/Base.html#M000112">merge (Git::Base)</a><br /> - <a href="classes/Git/Remote.html#M000169">merge (Git::Remote)</a><br /> - <a href="classes/Git/Branch.html#M000077">merge (Git::Branch)</a><br /> - <a href="classes/Git/Lib.html#M000054">merge (Git::Lib)</a><br /> - <a href="classes/Git/Object/Commit.html#M000126">message (Git::Object::Commit)</a><br /> - <a href="classes/Git/Object.html#M000125">new (Git::Object)</a><br /> - <a href="classes/Git/Remote.html#M000166">new (Git::Remote)</a><br /> - <a href="classes/Git/Diff.html#M000153">new (Git::Diff)</a><br /> - <a href="classes/Git/Object/Tree.html#M000146">new (Git::Object::Tree)</a><br /> + <a href="classes/Git/Lib.html#M000043">ls_files (Git::Lib)</a><br /> + <a href="classes/Git/Base.html#M000140">ls_files (Git::Base)</a><br /> + <a href="classes/Git/Lib.html#M000035">ls_tree (Git::Lib)</a><br /> + <a href="classes/Git/Branch.html#M000085">merge (Git::Branch)</a><br /> + <a href="classes/Git/Remote.html#M000201">merge (Git::Remote)</a><br /> + <a href="classes/Git/Base.html#M000123">merge (Git::Base)</a><br /> + <a href="classes/Git/Lib.html#M000055">merge (Git::Lib)</a><br /> + <a href="classes/Git/Object/Commit.html#M000150">message (Git::Object::Commit)</a><br /> + <a href="classes/Git/Object/Commit.html#M000151">name (Git::Object::Commit)</a><br /> + <a href="classes/Git/Lib.html#M000030">namerev (Git::Lib)</a><br /> + <a href="classes/Git/Object/Tree.html#M000178">new (Git::Object::Tree)</a><br /> + <a href="classes/Git/Diff.html#M000185">new (Git::Diff)</a><br /> + <a href="classes/Git/Branches.html#M000071">new (Git::Branches)</a><br /> + <a href="classes/Git/Log.html#M000015">new (Git::Log)</a><br /> <a href="classes/Git/Lib.html#M000025">new (Git::Lib)</a><br /> - <a href="classes/Git/Object/Blob.html#M000145">new (Git::Object::Blob)</a><br /> - <a href="classes/Git/Object/Tag.html#M000144">new (Git::Object::Tag)</a><br /> - <a href="classes/Git/Object/AbstractObject.html#M000136">new (Git::Object::AbstractObject)</a><br /> - <a href="classes/Git/Branches.html#M000064">new (Git::Branches)</a><br /> <a href="classes/Git/Status/StatusFile.html#M000013">new (Git::Status::StatusFile)</a><br /> - <a href="classes/Git/Log.html#M000015">new (Git::Log)</a><br /> - <a href="classes/Git/Base.html#M000084">new (Git::Base)</a><br /> - <a href="classes/Git/Diff/DiffFile.html#M000164">new (Git::Diff::DiffFile)</a><br /> <a href="classes/Git/Author.html#M000024">new (Git::Author)</a><br /> + <a href="classes/Git/Object/AbstractObject.html#M000161">new (Git::Object::AbstractObject)</a><br /> + <a href="classes/Git/Diff/DiffFile.html#M000196">new (Git::Diff::DiffFile)</a><br /> + <a href="classes/Git/Remote.html#M000198">new (Git::Remote)</a><br /> + <a href="classes/Git/Branch.html#M000077">new (Git::Branch)</a><br /> + <a href="classes/Git/Object/Tag.html#M000176">new (Git::Object::Tag)</a><br /> + <a href="classes/Git/Object.html#M000149">new (Git::Object)</a><br /> <a href="classes/Git/Status.html#M000005">new (Git::Status)</a><br /> - <a href="classes/Git/Path.html#M000122">new (Git::Path)</a><br /> - <a href="classes/Git/Branch.html#M000070">new (Git::Branch)</a><br /> + <a href="classes/Git/Path.html#M000145">new (Git::Path)</a><br /> + <a href="classes/Git/Base.html#M000093">new (Git::Base)</a><br /> + <a href="classes/Git/Object/Blob.html#M000177">new (Git::Object::Blob)</a><br /> <a href="classes/Git/Log.html#M000016">object (Git::Log)</a><br /> - <a href="classes/Git/Base.html#M000091">object (Git::Base)</a><br /> - <a href="classes/Git/Lib.html#M000033">object_contents (Git::Lib)</a><br /> - <a href="classes/Git/Lib.html#M000031">object_size (Git::Lib)</a><br /> - <a href="classes/Git/Lib.html#M000030">object_type (Git::Lib)</a><br /> + <a href="classes/Git/Base.html#M000102">object (Git::Base)</a><br /> + <a href="classes/Git/Lib.html#M000034">object_contents (Git::Lib)</a><br /> + <a href="classes/Git/Lib.html#M000032">object_size (Git::Lib)</a><br /> + <a href="classes/Git/Lib.html#M000031">object_type (Git::Lib)</a><br /> + <a href="classes/Git/Base.html#M000090">open (Git::Base)</a><br /> <a href="classes/Git.html#M000002">open (Git)</a><br /> - <a href="classes/Git/Base.html#M000081">open (Git::Base)</a><br /> - <a href="classes/Git/Object/Commit.html#M000128">parent (Git::Object::Commit)</a><br /> - <a href="classes/Git/Object/Commit.html#M000129">parents (Git::Object::Commit)</a><br /> - <a href="classes/Git/Diff.html#M000160">patch (Git::Diff)</a><br /> + <a href="classes/Git/Object/Commit.html#M000153">parent (Git::Object::Commit)</a><br /> + <a href="classes/Git/Object/Commit.html#M000154">parents (Git::Object::Commit)</a><br /> + <a href="classes/Git/Diff.html#M000192">patch (Git::Diff)</a><br /> + <a href="classes/Git/Diff.html#M000186">path (Git::Diff)</a><br /> <a href="classes/Git/Log.html#M000017">path (Git::Log)</a><br /> - <a href="classes/Git/Diff.html#M000154">path (Git::Diff)</a><br /> <a href="classes/Git/Status.html#M000010">pretty (Git::Status)</a><br /> - <a href="classes/Git/Base.html#M000113">pull (Git::Base)</a><br /> - <a href="classes/Git/Lib.html#M000061">push (Git::Lib)</a><br /> - <a href="classes/Git/Base.html#M000111">push (Git::Base)</a><br /> - <a href="classes/Git/Path.html#M000123">readable? (Git::Path)</a><br /> - <a href="classes/Git/Base.html#M000099">remote (Git::Base)</a><br /> - <a href="classes/Git/Branches.html#M000066">remote (Git::Branches)</a><br /> - <a href="classes/Git/Lib.html#M000055">remote_add (Git::Lib)</a><br /> - <a href="classes/Git/Lib.html#M000056">remote_remove (Git::Lib)</a><br /> - <a href="classes/Git/Base.html#M000114">remotes (Git::Base)</a><br /> - <a href="classes/Git/Lib.html#M000057">remotes (Git::Lib)</a><br /> - <a href="classes/Git/Base.html#M000104">remove (Git::Base)</a><br /> - <a href="classes/Git/Lib.html#M000048">remove (Git::Lib)</a><br /> - <a href="classes/Git/Remote.html#M000167">remove (Git::Remote)</a><br /> - <a href="classes/Git/Remote.html#M000171">remove (Git::Remote)</a><br /> - <a href="classes/Git/Base.html#M000119">repack (Git::Base)</a><br /> - <a href="classes/Git/Lib.html#M000063">repack (Git::Lib)</a><br /> - <a href="classes/Git/Base.html#M000086">repo (Git::Base)</a><br /> - <a href="classes/Git/Base.html#M000089">repo_size (Git::Base)</a><br /> - <a href="classes/Git/Lib.html#M000050">reset (Git::Lib)</a><br /> - <a href="classes/Git/Base.html#M000105">reset (Git::Base)</a><br /> - <a href="classes/Git/Base.html#M000106">reset_hard (Git::Base)</a><br /> + <a href="classes/Git/Base.html#M000124">pull (Git::Base)</a><br /> + <a href="classes/Git/Lib.html#M000062">push (Git::Lib)</a><br /> + <a href="classes/Git/Base.html#M000122">push (Git::Base)</a><br /> + <a href="classes/Git/Lib.html#M000065">read_tree (Git::Lib)</a><br /> + <a href="classes/Git/Base.html#M000135">read_tree (Git::Base)</a><br /> + <a href="classes/Git/Path.html#M000146">readable? (Git::Path)</a><br /> + <a href="classes/Git/Base.html#M000110">remote (Git::Base)</a><br /> + <a href="classes/Git/Branches.html#M000073">remote (Git::Branches)</a><br /> + <a href="classes/Git/Lib.html#M000056">remote_add (Git::Lib)</a><br /> + <a href="classes/Git/Lib.html#M000057">remote_remove (Git::Lib)</a><br /> + <a href="classes/Git/Base.html#M000125">remotes (Git::Base)</a><br /> + <a href="classes/Git/Lib.html#M000058">remotes (Git::Lib)</a><br /> + <a href="classes/Git/Remote.html#M000203">remove (Git::Remote)</a><br /> + <a href="classes/Git/Remote.html#M000199">remove (Git::Remote)</a><br /> + <a href="classes/Git/Lib.html#M000049">remove (Git::Lib)</a><br /> + <a href="classes/Git/Base.html#M000115">remove (Git::Base)</a><br /> + <a href="classes/Git/Base.html#M000131">repack (Git::Base)</a><br /> + <a href="classes/Git/Lib.html#M000064">repack (Git::Lib)</a><br /> + <a href="classes/Git/Base.html#M000095">repo (Git::Base)</a><br /> + <a href="classes/Git/Base.html#M000100">repo_size (Git::Base)</a><br /> + <a href="classes/Git/Base.html#M000116">reset (Git::Base)</a><br /> + <a href="classes/Git/Lib.html#M000051">reset (Git::Lib)</a><br /> + <a href="classes/Git/Base.html#M000117">reset_hard (Git::Base)</a><br /> + <a href="classes/Git/Base.html#M000143">revparse (Git::Base)</a><br /> <a href="classes/Git/Lib.html#M000029">revparse (Git::Lib)</a><br /> - <a href="classes/Git/Base.html#M000120">revparse (Git::Base)</a><br /> - <a href="classes/Git/Object/AbstractObject.html#M000139">setup (Git::Object::AbstractObject)</a><br /> + <a href="classes/Git/Base.html#M000098">set_index (Git::Base)</a><br /> + <a href="classes/Git/Base.html#M000097">set_working (Git::Base)</a><br /> + <a href="classes/Git/Object/AbstractObject.html#M000166">setup (Git::Object::AbstractObject)</a><br /> + <a href="classes/Git/Object/AbstractObject.html#M000162">sha (Git::Object::AbstractObject)</a><br /> <a href="classes/Git/Log.html#M000018">since (Git::Log)</a><br /> - <a href="classes/Git/Diff.html#M000155">size (Git::Diff)</a><br /> - <a href="classes/Git/Branches.html#M000067">size (Git::Branches)</a><br /> + <a href="classes/Git/Object/AbstractObject.html#M000163">size (Git::Object::AbstractObject)</a><br /> + <a href="classes/Git/Branches.html#M000074">size (Git::Branches)</a><br /> <a href="classes/Git/Log.html#M000021">size (Git::Log)</a><br /> - <a href="classes/Git/Diff.html#M000159">stats (Git::Diff)</a><br /> - <a href="classes/Git/Base.html#M000096">status (Git::Base)</a><br /> - <a href="classes/Git/Object/Tree.html#M000152">subdirectories (Git::Object::Tree)</a><br /> - <a href="classes/Git/Object/Tree.html#M000151">subtrees (Git::Object::Tree)</a><br /> - <a href="classes/Git/Lib.html#M000059">tag (Git::Lib)</a><br /> - <a href="classes/Git/Base.html#M000117">tag (Git::Base)</a><br /> - <a href="classes/Git/Lib.html#M000062">tag_sha (Git::Lib)</a><br /> - <a href="classes/Git/Lib.html#M000058">tags (Git::Lib)</a><br /> - <a href="classes/Git/Base.html#M000116">tags (Git::Base)</a><br /> - <a href="classes/Git/Branch.html#M000078">to_a (Git::Branch)</a><br /> + <a href="classes/Git/Diff.html#M000187">size (Git::Diff)</a><br /> + <a href="classes/Git/Diff.html#M000191">stats (Git::Diff)</a><br /> + <a href="classes/Git/Base.html#M000107">status (Git::Base)</a><br /> + <a href="classes/Git/Object/Tree.html#M000184">subdirectories (Git::Object::Tree)</a><br /> + <a href="classes/Git/Object/Tree.html#M000183">subtrees (Git::Object::Tree)</a><br /> + <a href="classes/Git/Lib.html#M000060">tag (Git::Lib)</a><br /> + <a href="classes/Git/Base.html#M000128">tag (Git::Base)</a><br /> + <a href="classes/Git/Object/AbstractObject.html#M000175">tag? (Git::Object::AbstractObject)</a><br /> + <a href="classes/Git/Lib.html#M000063">tag_sha (Git::Lib)</a><br /> + <a href="classes/Git/Base.html#M000127">tags (Git::Base)</a><br /> + <a href="classes/Git/Lib.html#M000059">tags (Git::Lib)</a><br /> + <a href="classes/Git/Branch.html#M000087">to_a (Git::Branch)</a><br /> <a href="classes/Git/Log.html#M000020">to_s (Git::Log)</a><br /> - <a href="classes/Git/Diff.html#M000161">to_s (Git::Diff)</a><br /> - <a href="classes/Git/Branch.html#M000079">to_s (Git::Branch)</a><br /> - <a href="classes/Git/Object/AbstractObject.html#M000140">to_s (Git::Object::AbstractObject)</a><br /> - <a href="classes/Git/Remote.html#M000172">to_s (Git::Remote)</a><br /> - <a href="classes/Git/Object/Tree.html#M000150">trees (Git::Object::Tree)</a><br /> + <a href="classes/Git/Branch.html#M000088">to_s (Git::Branch)</a><br /> + <a href="classes/Git/Object/AbstractObject.html#M000167">to_s (Git::Object::AbstractObject)</a><br /> + <a href="classes/Git/Diff.html#M000193">to_s (Git::Diff)</a><br /> + <a href="classes/Git/Path.html#M000148">to_s (Git::Path)</a><br /> + <a href="classes/Git/Remote.html#M000204">to_s (Git::Remote)</a><br /> + <a href="classes/Git/Object/AbstractObject.html#M000172">tree? (Git::Object::AbstractObject)</a><br /> + <a href="classes/Git/Object/Tree.html#M000182">trees (Git::Object::Tree)</a><br /> <a href="classes/Git/Status.html#M000009">untracked (Git::Status)</a><br /> - <a href="classes/Git/Path.html#M000124">writable? (Git::Path)</a><br /> + <a href="classes/Git/Lib.html#M000068">update_ref (Git::Lib)</a><br /> + <a href="classes/Git/Branch.html#M000086">update_ref (Git::Branch)</a><br /> + <a href="classes/Git/Base.html#M000139">update_ref (Git::Base)</a><br /> + <a href="classes/Git/Base.html#M000132">with_index (Git::Base)</a><br /> + <a href="classes/Git/Base.html#M000133">with_temp_index (Git::Base)</a><br /> + <a href="classes/Git/Base.html#M000142">with_temp_working (Git::Base)</a><br /> + <a href="classes/Git/Base.html#M000141">with_working (Git::Base)</a><br /> + <a href="classes/Git/Path.html#M000147">writable? (Git::Path)</a><br /> + <a href="classes/Git/Base.html#M000138">write_and_commit_tree (Git::Base)</a><br /> + <a href="classes/Git/Lib.html#M000066">write_tree (Git::Lib)</a><br /> + <a href="classes/Git/Base.html#M000136">write_tree (Git::Base)</a><br /> </div> </div> </body> diff --git a/lib/git/lib.rb b/lib/git/lib.rb index dbd3d69..76223de 100644 --- a/lib/git/lib.rb +++ b/lib/git/lib.rb @@ -427,11 +427,11 @@ module Git end def command(cmd, opts = {}) - ENV['GIT_DIR'] = @git_dir - ENV['GIT_INDEX_FILE'] = @git_index_file - ENV['GIT_WORK_DIR'] = @git_work_dir - path = @git_work_dir || @git_dir || @path - Dir.chdir(path) do + ENV['GIT_DIR'] = @git_dir if (@git_dir != ENV['GIT_DIR']) + ENV['GIT_INDEX_FILE'] = @git_index_file if (@git_index_file != ENV['GIT_INDEX_FILE']) + ENV['GIT_WORK_DIR'] = @git_work_dir if (@git_work_dir != ENV['GIT_WORK_DIR']) + #path = @git_work_dir || @git_dir || @path + #Dir.chdir(path) do opts = opts.to_a.join(' ') git_cmd = "git #{cmd} #{opts}" out = `git #{cmd} #{opts} 2>&1`.chomp @@ -449,7 +449,7 @@ module Git raise Git::GitExecuteError.new(git_cmd + ':' + out.to_s) end out - end + #end end end |