From 72635ea8bb741627f828c47d883dbfcdff189c94 Mon Sep 17 00:00:00 2001 From: scott Chacon Date: Mon, 19 Nov 2007 07:51:08 -0800 Subject: updated documentation --- doc/classes/Git/Branch.html | 2 +- doc/classes/Git/Lib.html | 87 ++++++++++++++++++++------------------ doc/classes/Git/Object.html | 2 +- doc/classes/Git/Object/Commit.html | 3 ++ doc/classes/Git/Object/Tag.html | 2 +- doc/created.rid | 2 +- doc/files/lib/git/branch_rb.html | 2 +- doc/files/lib/git/lib_rb.html | 2 +- doc/files/lib/git/object_rb.html | 2 +- 9 files changed, 55 insertions(+), 49 deletions(-) (limited to 'doc') diff --git a/doc/classes/Git/Branch.html b/doc/classes/Git/Branch.html index d5d0486..2bdb328 100644 --- a/doc/classes/Git/Branch.html +++ b/doc/classes/Git/Branch.html @@ -311,7 +311,7 @@
 # File lib/git/branch.rb, line 23
     def gcommit
-      @gcommit = @base.object(@full) if !@gcommit
+      @gcommit = @base.gcommit(@full) if !@gcommit
       @gcommit
     end
 
diff --git a/doc/classes/Git/Lib.html b/doc/classes/Git/Lib.html index 57feb6c..3ba8fe0 100644 --- a/doc/classes/Git/Lib.html +++ b/doc/classes/Git/Lib.html @@ -204,7 +204,7 @@ onclick="toggleCode('M000050-source');return false;">[Source]

-# File lib/git/lib.rb, line 293
+# File lib/git/lib.rb, line 296
     def add(path = '.')
       path = path.join(' ') if path.is_a?(Array)
       command('add', path)
@@ -240,7 +240,7 @@ options
             onclick="toggleCode('M000072-source');return false;">[Source]

-# File lib/git/lib.rb, line 435
+# File lib/git/lib.rb, line 438
     def archive(sha, file = nil, opts = {})
       opts[:format] = 'zip' if !opts[:format]
       
@@ -283,7 +283,7 @@ options
             onclick="toggleCode('M000039-source');return false;">[Source]

-# File lib/git/lib.rb, line 174
+# File lib/git/lib.rb, line 177
     def branch_current
       branches_all.select { |b| b[1] }.first[0] rescue nil
     end
@@ -306,7 +306,7 @@ options
             onclick="toggleCode('M000055-source');return false;">[Source]

-# File lib/git/lib.rb, line 326
+# File lib/git/lib.rb, line 329
     def branch_delete(branch)
       command('branch', ['-d', branch])
     end
@@ -329,7 +329,7 @@ options
             onclick="toggleCode('M000054-source');return false;">[Source]

-# File lib/git/lib.rb, line 322
+# File lib/git/lib.rb, line 325
     def branch_new(branch)
       command('branch', branch)
     end
@@ -352,7 +352,7 @@ options
             onclick="toggleCode('M000038-source');return false;">[Source]

-# File lib/git/lib.rb, line 164
+# File lib/git/lib.rb, line 167
     def branches_all
       arr = []
       command_lines('branch', '-a').each do |b| 
@@ -381,7 +381,7 @@ options
             onclick="toggleCode('M000056-source');return false;">[Source]

-# File lib/git/lib.rb, line 330
+# File lib/git/lib.rb, line 333
     def checkout(branch, opts = {})
       arr_opts = []
       arr_opts << '-f' if opts[:force]
@@ -408,7 +408,7 @@ options
             onclick="toggleCode('M000071-source');return false;">[Source]

-# File lib/git/lib.rb, line 419
+# File lib/git/lib.rb, line 422
     def checkout_index(opts = {})
       arr_opts = []
       arr_opts << "--prefix=#{opts[:prefix]}" if opts[:prefix]
@@ -489,7 +489,7 @@ TODO - make this work with SSH password or auth_key
             onclick="toggleCode('M000052-source');return false;">[Source]

-# File lib/git/lib.rb, line 308
+# File lib/git/lib.rb, line 311
     def commit(message, opts = {})
       arr_opts = ["-m '#{message}'"]
       arr_opts << '-a' if opts[:add_all]
@@ -517,7 +517,7 @@ returns useful array of raw commit object data
             onclick="toggleCode('M000034-source');return false;">[Source]

-# File lib/git/lib.rb, line 101
+# File lib/git/lib.rb, line 104
     def commit_data(sha)
       sha = sha.to_s
       cdata = command_lines('cat-file', ['commit', sha])
@@ -542,7 +542,7 @@ returns useful array of raw commit object data
             onclick="toggleCode('M000069-source');return false;">[Source]

-# File lib/git/lib.rb, line 401
+# File lib/git/lib.rb, line 404
     def commit_tree(tree, opts = {})
       opts[:message] = "commit tree #{tree}" if !opts[:message]
       t = Tempfile.new('commit-message') do |t|
@@ -575,7 +575,7 @@ returns useful array of raw commit object data
             onclick="toggleCode('M000047-source');return false;">[Source]

-# File lib/git/lib.rb, line 274
+# File lib/git/lib.rb, line 277
     def config_get(name)
       command('config', ['--get', name])
     end
@@ -598,7 +598,7 @@ returns useful array of raw commit object data
             onclick="toggleCode('M000048-source');return false;">[Source]

-# File lib/git/lib.rb, line 278
+# File lib/git/lib.rb, line 281
     def config_list
       hsh = {}
       command_lines('config', ['--list']).each do |line|
@@ -626,7 +626,7 @@ returns useful array of raw commit object data
             onclick="toggleCode('M000046-source');return false;">[Source]

-# File lib/git/lib.rb, line 265
+# File lib/git/lib.rb, line 268
     def config_remote(name)
       hsh = {}
       command_lines('config', ['--get-regexp', "remote.#{name}"]).each do |line|
@@ -657,7 +657,7 @@ WRITE COMMANDS ##
             onclick="toggleCode('M000049-source');return false;">[Source]

-# File lib/git/lib.rb, line 289
+# File lib/git/lib.rb, line 292
     def config_set(name, value)
       command('config', [name, "'#{value}'"])
     end
@@ -683,7 +683,7 @@ compares the index and the working directory
             onclick="toggleCode('M000043-source');return false;">[Source]

-# File lib/git/lib.rb, line 231
+# File lib/git/lib.rb, line 234
     def diff_files
       hsh = {}
       command_lines('diff-files').each do |line|
@@ -713,7 +713,7 @@ compares the index and the working directory
             onclick="toggleCode('M000041-source');return false;">[Source]

-# File lib/git/lib.rb, line 201
+# File lib/git/lib.rb, line 204
     def diff_full(obj1 = 'HEAD', obj2 = nil, opts = {})
       diff_opts = ['-p']
       diff_opts << obj1
@@ -744,7 +744,7 @@ compares the index and the repository
             onclick="toggleCode('M000044-source');return false;">[Source]

-# File lib/git/lib.rb, line 243
+# File lib/git/lib.rb, line 246
     def diff_index(treeish)
       hsh = {}
       command_lines('diff-index', treeish).each do |line|
@@ -774,7 +774,7 @@ compares the index and the repository
             onclick="toggleCode('M000042-source');return false;">[Source]

-# File lib/git/lib.rb, line 210
+# File lib/git/lib.rb, line 213
     def diff_stats(obj1 = 'HEAD', obj2 = nil, opts = {})
       diff_opts = ['--numstat']
       diff_opts << obj1
@@ -813,7 +813,7 @@ compares the index and the repository
             onclick="toggleCode('M000063-source');return false;">[Source]

-# File lib/git/lib.rb, line 373
+# File lib/git/lib.rb, line 376
     def fetch(remote)
       command('fetch', remote.to_s)
     end
@@ -878,7 +878,7 @@ returns hash
             onclick="toggleCode('M000040-source');return false;">[Source]

-# File lib/git/lib.rb, line 182
+# File lib/git/lib.rb, line 185
     def grep(string, opts = {})
       opts[:object] = 'HEAD' if !opts[:object]
 
@@ -972,7 +972,7 @@ READ COMMANDS ##
             onclick="toggleCode('M000045-source');return false;">[Source]

-# File lib/git/lib.rb, line 254
+# File lib/git/lib.rb, line 257
     def ls_files
       hsh = {}
       command_lines('ls-files', '--stage').each do |line|
@@ -1001,7 +1001,7 @@ READ COMMANDS ##
             onclick="toggleCode('M000037-source');return false;">[Source]

-# File lib/git/lib.rb, line 154
+# File lib/git/lib.rb, line 157
     def ls_tree(sha)
       data = {'blob' => {}, 'tree' => {}}
       command_lines('ls-tree', sha.to_s).each do |line|
@@ -1030,7 +1030,7 @@ READ COMMANDS ##
             onclick="toggleCode('M000057-source');return false;">[Source]

-# File lib/git/lib.rb, line 338
+# File lib/git/lib.rb, line 341
     def merge(branch, message = nil)      
       arr_opts = []
       arr_opts << ["-m '#{message}'"] if message
@@ -1056,7 +1056,7 @@ READ COMMANDS ##
             onclick="toggleCode('M000031-source');return false;">[Source]

-# File lib/git/lib.rb, line 88
+# File lib/git/lib.rb, line 91
     def namerev(string)
       command('name-rev', string).split[1]
     end
@@ -1079,7 +1079,7 @@ READ COMMANDS ##
             onclick="toggleCode('M000036-source');return false;">[Source]

-# File lib/git/lib.rb, line 150
+# File lib/git/lib.rb, line 153
     def object_contents(sha)
       command('cat-file', ['-p', sha])
     end
@@ -1102,7 +1102,7 @@ READ COMMANDS ##
             onclick="toggleCode('M000033-source');return false;">[Source]

-# File lib/git/lib.rb, line 96
+# File lib/git/lib.rb, line 99
     def object_size(sha)
       command('cat-file', ['-s', sha]).to_i
     end
@@ -1125,7 +1125,7 @@ READ COMMANDS ##
             onclick="toggleCode('M000032-source');return false;">[Source]

-# File lib/git/lib.rb, line 92
+# File lib/git/lib.rb, line 95
     def object_type(sha)
       command('cat-file', ['-t', sha])
     end
@@ -1148,7 +1148,7 @@ READ COMMANDS ##
             onclick="toggleCode('M000035-source');return false;">[Source]

-# File lib/git/lib.rb, line 107
+# File lib/git/lib.rb, line 110
     def process_commit_data(data, sha = nil)
       in_message = false
       
@@ -1210,7 +1210,7 @@ READ COMMANDS ##
             onclick="toggleCode('M000064-source');return false;">[Source]

-# File lib/git/lib.rb, line 377
+# File lib/git/lib.rb, line 380
     def push(remote, branch = 'master')
       command('push', [remote.to_s, branch.to_s])
     end
@@ -1236,7 +1236,7 @@ reads a tree into the current index file
             onclick="toggleCode('M000067-source');return false;">[Source]

-# File lib/git/lib.rb, line 390
+# File lib/git/lib.rb, line 393
     def read_tree(treeish, opts = {})
       arr_opts = []
       arr_opts << "--prefix=#{opts[:prefix]}" if opts[:prefix]
@@ -1262,7 +1262,7 @@ reads a tree into the current index file
             onclick="toggleCode('M000058-source');return false;">[Source]

-# File lib/git/lib.rb, line 345
+# File lib/git/lib.rb, line 348
     def remote_add(name, url, opts = {})
       arr_opts = ['add']
       arr_opts << '-f' if opts[:with_fetch]
@@ -1294,7 +1294,7 @@ to get around it some other way later
             onclick="toggleCode('M000059-source');return false;">[Source]

-# File lib/git/lib.rb, line 356
+# File lib/git/lib.rb, line 359
     def remote_remove(name)
       command('remote', ['rm', name])
     end
@@ -1317,7 +1317,7 @@ to get around it some other way later
             onclick="toggleCode('M000060-source');return false;">[Source]

-# File lib/git/lib.rb, line 360
+# File lib/git/lib.rb, line 363
     def remotes
       command_lines('remote')
     end
@@ -1340,7 +1340,7 @@ to get around it some other way later
             onclick="toggleCode('M000051-source');return false;">[Source]

-# File lib/git/lib.rb, line 298
+# File lib/git/lib.rb, line 301
     def remove(path = '.', opts = {})
       path = path.join(' ') if path.is_a?(Array)
 
@@ -1369,7 +1369,7 @@ to get around it some other way later
             onclick="toggleCode('M000066-source');return false;">[Source]

-# File lib/git/lib.rb, line 385
+# File lib/git/lib.rb, line 388
     def repack
       command('repack', ['-a', '-d'])
     end
@@ -1392,7 +1392,7 @@ to get around it some other way later
             onclick="toggleCode('M000053-source');return false;">[Source]

-# File lib/git/lib.rb, line 314
+# File lib/git/lib.rb, line 317
     def reset(commit, opts = {})
       arr_opts = []
       arr_opts << '--hard' if opts[:hard]
@@ -1420,6 +1420,9 @@ to get around it some other way later
 
 # File lib/git/lib.rb, line 84
     def revparse(string)
+      if /\w{40}/.match(string)  # passing in a sha - just no-op it
+        return string
+      end
       command('rev-parse', string)
     end
 
@@ -1441,7 +1444,7 @@ to get around it some other way later onclick="toggleCode('M000062-source');return false;">[Source]

-# File lib/git/lib.rb, line 368
+# File lib/git/lib.rb, line 371
     def tag(tag)
       command('tag', tag)
     end
@@ -1464,7 +1467,7 @@ to get around it some other way later
             onclick="toggleCode('M000065-source');return false;">[Source]

-# File lib/git/lib.rb, line 381
+# File lib/git/lib.rb, line 384
     def tag_sha(tag_name)
       command('show-ref',  ['--tags', '-s', tag_name])
     end
@@ -1487,7 +1490,7 @@ to get around it some other way later
             onclick="toggleCode('M000061-source');return false;">[Source]

-# File lib/git/lib.rb, line 364
+# File lib/git/lib.rb, line 367
     def tags
       command_lines('tag')
     end
@@ -1510,7 +1513,7 @@ to get around it some other way later
             onclick="toggleCode('M000070-source');return false;">[Source]

-# File lib/git/lib.rb, line 415
+# File lib/git/lib.rb, line 418
     def update_ref(branch, commit)
       command('update-ref', [branch.to_s, commit.to_s])
     end
@@ -1533,7 +1536,7 @@ to get around it some other way later
             onclick="toggleCode('M000068-source');return false;">[Source]

-# File lib/git/lib.rb, line 397
+# File lib/git/lib.rb, line 400
     def write_tree
       command('write-tree')
     end
diff --git a/doc/classes/Git/Object.html b/doc/classes/Git/Object.html
index a5aad24..6f1d863 100644
--- a/doc/classes/Git/Object.html
+++ b/doc/classes/Git/Object.html
@@ -144,7 +144,7 @@ this is our little factory method
             onclick="toggleCode('M000151-source');return false;">[Source]

-# File lib/git/object.rb, line 253
+# File lib/git/object.rb, line 256
       def new(base, objectish, type = nil, is_tag = false)
         if is_tag
           sha = base.lib.tag_sha(objectish)
diff --git a/doc/classes/Git/Object/Commit.html b/doc/classes/Git/Object/Commit.html
index 18ec570..49396b0 100644
--- a/doc/classes/Git/Object/Commit.html
+++ b/doc/classes/Git/Object/Commit.html
@@ -424,6 +424,9 @@ array of all parent commits
 
 # File lib/git/object.rb, line 210
       def set_commit(data)
+        if data['sha']
+          @sha = data['sha']
+        end
         @committer = Git::Author.new(data['committer'])
         @author = Git::Author.new(data['author'])
         @tree = Tree.new(@base, data['tree'])
diff --git a/doc/classes/Git/Object/Tag.html b/doc/classes/Git/Object/Tag.html
index 8c9c275..54319e5 100644
--- a/doc/classes/Git/Object/Tag.html
+++ b/doc/classes/Git/Object/Tag.html
@@ -137,7 +137,7 @@
             onclick="toggleCode('M000180-source');return false;">[Source]

-# File lib/git/object.rb, line 237
+# File lib/git/object.rb, line 240
       def initialize(base, sha, name)
         super(base, sha)
         @name = name
diff --git a/doc/created.rid b/doc/created.rid
index 7e12778..5346368 100644
--- a/doc/created.rid
+++ b/doc/created.rid
@@ -1 +1 @@
-Mon Nov 19 07:34:15 PST 2007
+Mon Nov 19 07:51:00 PST 2007
diff --git a/doc/files/lib/git/branch_rb.html b/doc/files/lib/git/branch_rb.html
index 6ad83e0..d2fda34 100644
--- a/doc/files/lib/git/branch_rb.html
+++ b/doc/files/lib/git/branch_rb.html
@@ -56,7 +56,7 @@
     
     
       Last Update:
-      Fri Nov 16 11:34:13 PST 2007
+      Mon Nov 19 07:48:38 PST 2007
     
     
   
diff --git a/doc/files/lib/git/lib_rb.html b/doc/files/lib/git/lib_rb.html index 9c30b9c..a5744b3 100644 --- a/doc/files/lib/git/lib_rb.html +++ b/doc/files/lib/git/lib_rb.html @@ -56,7 +56,7 @@ Last Update: - Mon Nov 19 06:43:24 PST 2007 + Mon Nov 19 07:49:10 PST 2007
diff --git a/doc/files/lib/git/object_rb.html b/doc/files/lib/git/object_rb.html index e656131..e10e7a6 100644 --- a/doc/files/lib/git/object_rb.html +++ b/doc/files/lib/git/object_rb.html @@ -56,7 +56,7 @@ Last Update: - Mon Nov 19 06:45:48 PST 2007 + Mon Nov 19 07:42:35 PST 2007
-- cgit