55
55
< tr class ="top-aligned-row ">
56
56
< td > < strong > In:</ strong > </ td >
57
57
< td >
58
+ < a href ="../files/lib/git/author_rb.html ">
59
+ lib/git/author.rb
60
+ </ a >
61
+ < br />
58
62
< a href ="../files/lib/git/base_rb.html ">
59
63
lib/git/base.rb
60
64
</ a >
124
128
125
129
< div id ="contextContent ">
126
130
131
+ < div id ="description ">
132
+ < p >
133
+ < a href ="Git.html "> Git</ a > /Ruby Library
134
+ </ p >
135
+ < p >
136
+ This provides bindings for working with git in complex interactions,
137
+ including branching and merging, object inspection and manipulation,
138
+ history, patch generation and more. You should be able to do most
139
+ fundamental git operations with this library.
140
+ </ p >
141
+ < p >
142
+ This module provides the basic functions to open a git reference to work
143
+ with. You can open a working directory, open a bare repository, initialize
144
+ a new repo or clone an existing remote repository.
145
+ </ p >
146
+ < table >
147
+ < tr > < td valign ="top "> < a href ="Git/Author.html "> Author</ a > :</ td > < td > Scott Chacon (< a href ="mailto:schacon@gmail.com "> schacon@gmail.com</ a > )
148
+
149
+ </ td > </ tr >
150
+ < tr > < td valign ="top "> License:</ td > < td > MIT License
151
+
152
+ </ td > </ tr >
153
+ </ table >
154
+
155
+ </ div >
127
156
128
157
129
158
</ div >
@@ -149,7 +178,8 @@ <h3 class="section-bar">Methods</h3>
149
178
< div id ="class-list ">
150
179
< h3 class ="section-bar "> Classes and Modules</ h3 >
151
180
152
- Class < a href ="Git/Base.html " class ="link "> Git::Base</ a > < br />
181
+ Class < a href ="Git/Author.html " class ="link "> Git::Author</ a > < br />
182
+ Class < a href ="Git/Base.html " class ="link "> Git::Base</ a > < br />
153
183
Class < a href ="Git/Branch.html " class ="link "> Git::Branch</ a > < br />
154
184
Class < a href ="Git/Branches.html " class ="link "> Git::Branches</ a > < br />
155
185
Class < a href ="Git/Diff.html " class ="link "> Git::Diff</ a > < br />
@@ -175,7 +205,7 @@ <h3 class="section-bar">Constants</h3>
175
205
< tr class ="top-aligned-row context-row ">
176
206
< td class ="context-item-name "> VERSION</ td >
177
207
< td > =</ td >
178
- < td class ="context-item-value "> '1.0.1 '</ td >
208
+ < td class ="context-item-value "> '1.0.2 '</ td >
179
209
</ tr >
180
210
</ table >
181
211
</ div >
@@ -200,11 +230,19 @@ <h3 class="section-bar">Public Class methods</h3>
200
230
</ div >
201
231
202
232
< div class ="method-description ">
233
+ < p >
234
+ open a bare repository
235
+ </ p >
236
+ < p >
237
+ this takes the path to a bare git repo it expects not to be able to use a
238
+ working directory so you can’t checkout stuff, commit things, etc.
239
+ but you can do most read operations
240
+ </ p >
203
241
< p > < a class ="source-toggle " href ="# "
204
242
onclick ="toggleCode('M000001-source');return false; "> [Source]</ a > </ p >
205
243
< div class ="method-source-code " id ="M000001-source ">
206
244
< pre >
207
- < span class ="ruby-comment cmt "> # File lib/git.rb, line 36 </ span >
245
+ < span class ="ruby-comment cmt "> # File lib/git.rb, line 51 </ span >
208
246
< 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 > )
209
247
< span class ="ruby-constant "> Base</ span > .< span class ="ruby-identifier "> bare</ span > (< span class ="ruby-identifier "> git_dir</ span > )
210
248
< span class ="ruby-keyword kw "> end</ span >
@@ -223,11 +261,28 @@ <h3 class="section-bar">Public Class methods</h3>
223
261
</ div >
224
262
225
263
< div class ="method-description ">
264
+ < p >
265
+ clones a remote repository
266
+ </ p >
267
+ < p >
268
+ options
269
+ </ p >
270
+ < pre >
271
+ :bare => true (does a bare clone)
272
+ :repository => '/path/to/alt_git_dir'
273
+ :index => '/path/to/alt_index_file'
274
+ </ pre >
275
+ < p >
276
+ example
277
+ </ p >
278
+ < pre >
279
+ Git.clone('git://repo.or.cz/rubygit.git', 'clone.git', :bare => true)
280
+ </ pre >
226
281
< p > < a class ="source-toggle " href ="# "
227
282
onclick ="toggleCode('M000004-source');return false; "> [Source]</ a > </ p >
228
283
< div class ="method-source-code " id ="M000004-source ">
229
284
< pre >
230
- < span class ="ruby-comment cmt "> # File lib/git.rb, line 48 </ span >
285
+ < span class ="ruby-comment cmt "> # File lib/git.rb, line 88 </ span >
231
286
< span class ="ruby-keyword kw "> def</ span > < span class ="ruby-keyword kw "> self</ span > .< span class ="ruby-identifier "> clone</ span > (< span class ="ruby-identifier "> repository</ span > , < span class ="ruby-identifier "> name</ span > , < span class ="ruby-identifier "> options</ span > = {})
232
287
< span class ="ruby-constant "> Base</ span > .< span class ="ruby-identifier "> clone</ span > (< span class ="ruby-identifier "> repository</ span > , < span class ="ruby-identifier "> name</ span > , < span class ="ruby-identifier "> options</ span > )
233
288
< span class ="ruby-keyword kw "> end</ span >
@@ -246,11 +301,21 @@ <h3 class="section-bar">Public Class methods</h3>
246
301
</ div >
247
302
248
303
< div class ="method-description ">
304
+ < p >
305
+ initialize a new git repository, defaults to the current working directory
306
+ </ p >
307
+ < p >
308
+ options
309
+ </ p >
310
+ < pre >
311
+ :repository => '/path/to/alt_git_dir'
312
+ :index => '/path/to/alt_index_file'
313
+ </ pre >
249
314
< p > < a class ="source-toggle " href ="# "
250
315
onclick ="toggleCode('M000003-source');return false; "> [Source]</ a > </ p >
251
316
< div class ="method-source-code " id ="M000003-source ">
252
317
< pre >
253
- < span class ="ruby-comment cmt "> # File lib/git.rb, line 44 </ span >
318
+ < span class ="ruby-comment cmt "> # File lib/git.rb, line 74 </ span >
254
319
< span class ="ruby-keyword kw "> def</ span > < span class ="ruby-keyword kw "> self</ span > .< span class ="ruby-identifier "> init</ span > (< span class ="ruby-identifier "> working_dir</ span > = < span class ="ruby-value str "> '.'</ span > , < span class ="ruby-identifier "> options</ span > = {})
255
320
< span class ="ruby-constant "> Base</ span > .< span class ="ruby-identifier "> init</ span > (< span class ="ruby-identifier "> working_dir</ span > , < span class ="ruby-identifier "> options</ span > )
256
321
< span class ="ruby-keyword kw "> end</ span >
@@ -269,11 +334,27 @@ <h3 class="section-bar">Public Class methods</h3>
269
334
</ div >
270
335
271
336
< div class ="method-description ">
337
+ < p >
338
+ open an existing git working directory
339
+ </ p >
340
+ < p >
341
+ this will most likely be the most common way to create a git reference,
342
+ referring to a working directory. if not provided in the options, the
343
+ library will assume your git_dir and index are in the default place (.git/,
344
+ .git/index)
345
+ </ p >
346
+ < p >
347
+ options
348
+ </ p >
349
+ < pre >
350
+ :repository => '/path/to/alt_git_dir'
351
+ :index => '/path/to/alt_index_file'
352
+ </ pre >
272
353
< p > < a class ="source-toggle " href ="# "
273
354
onclick ="toggleCode('M000002-source');return false; "> [Source]</ a > </ p >
274
355
< div class ="method-source-code " id ="M000002-source ">
275
356
< pre >
276
- < span class ="ruby-comment cmt "> # File lib/git.rb, line 40 </ span >
357
+ < span class ="ruby-comment cmt "> # File lib/git.rb, line 65 </ span >
277
358
< span class ="ruby-keyword kw "> def</ span > < span class ="ruby-keyword kw "> self</ span > .< span class ="ruby-identifier "> open</ span > (< span class ="ruby-identifier "> working_dir</ span > , < span class ="ruby-identifier "> options</ span > = {})
278
359
< span class ="ruby-constant "> Base</ span > .< span class ="ruby-identifier "> open</ span > (< span class ="ruby-identifier "> working_dir</ span > , < span class ="ruby-identifier "> options</ span > )
279
360
< span class ="ruby-keyword kw "> end</ span >
0 commit comments