git 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of git might be problematic. Click here for more details.
- data/doc/classes/Git/Base.html +336 -336
- data/doc/classes/Git/Branch.html +74 -74
- data/doc/classes/Git/Branches.html +36 -36
- data/doc/classes/Git/Diff.html +64 -64
- data/doc/classes/Git/Diff/DiffFile.html +12 -12
- data/doc/classes/Git/Lib.html +397 -318
- data/doc/classes/Git/Log.html +2 -2
- data/doc/classes/Git/Object.html +7 -7
- data/doc/classes/Git/Object/AbstractObject.html +91 -91
- data/doc/classes/Git/Object/Blob.html +6 -6
- data/doc/classes/Git/Object/Commit.html +134 -74
- data/doc/classes/Git/Object/Tag.html +7 -7
- data/doc/classes/Git/Object/Tree.html +36 -36
- data/doc/classes/Git/Path.html +24 -24
- data/doc/classes/Git/Remote.html +41 -41
- data/doc/created.rid +1 -1
- data/doc/files/lib/git/branch_rb.html +1 -1
- data/doc/files/lib/git/diff_rb.html +1 -1
- data/doc/files/lib/git/lib_rb.html +1 -1
- data/doc/files/lib/git/log_rb.html +1 -1
- data/doc/files/lib/git/object_rb.html +1 -1
- data/doc/fr_method_index.html +183 -179
- data/lib/git.rb +1 -1
- data/lib/git/branch.rb +1 -1
- data/lib/git/lib.rb +71 -29
- data/lib/git/log.rb +4 -4
- data/lib/git/object.rb +20 -6
- data/tests/units/test_lib.rb +4 -4
- data/tests/units/test_log.rb +2 -5
- data/tests/units/test_object.rb +3 -3
- metadata +2 -2
data/doc/classes/Git/Diff.html
CHANGED
@@ -94,17 +94,17 @@ object that holds the last X commits on given branch
|
|
94
94
|
<h3 class="section-bar">Methods</h3>
|
95
95
|
|
96
96
|
<div class="name-list">
|
97
|
-
<a href="#
|
98
|
-
<a href="#
|
99
|
-
<a href="#
|
100
|
-
<a href="#
|
101
|
-
<a href="#
|
102
|
-
<a href="#
|
103
|
-
<a href="#
|
104
|
-
<a href="#
|
105
|
-
<a href="#
|
106
|
-
<a href="#
|
107
|
-
<a href="#
|
97
|
+
<a href="#M000198">[]</a>
|
98
|
+
<a href="#M000193">deletions</a>
|
99
|
+
<a href="#M000199">each</a>
|
100
|
+
<a href="#M000194">insertions</a>
|
101
|
+
<a href="#M000192">lines</a>
|
102
|
+
<a href="#M000189">new</a>
|
103
|
+
<a href="#M000196">patch</a>
|
104
|
+
<a href="#M000190">path</a>
|
105
|
+
<a href="#M000191">size</a>
|
106
|
+
<a href="#M000195">stats</a>
|
107
|
+
<a href="#M000197">to_s</a>
|
108
108
|
</div>
|
109
109
|
</div>
|
110
110
|
|
@@ -139,19 +139,19 @@ object that holds the last X commits on given branch
|
|
139
139
|
<div id="methods">
|
140
140
|
<h3 class="section-bar">Public Class methods</h3>
|
141
141
|
|
142
|
-
<div id="method-
|
143
|
-
<a name="
|
142
|
+
<div id="method-M000189" class="method-detail">
|
143
|
+
<a name="M000189"></a>
|
144
144
|
|
145
145
|
<div class="method-heading">
|
146
|
-
<a href="#
|
146
|
+
<a href="#M000189" class="method-signature">
|
147
147
|
<span class="method-name">new</span><span class="method-args">(base, from = nil, to = nil)</span>
|
148
148
|
</a>
|
149
149
|
</div>
|
150
150
|
|
151
151
|
<div class="method-description">
|
152
152
|
<p><a class="source-toggle" href="#"
|
153
|
-
onclick="toggleCode('
|
154
|
-
<div class="method-source-code" id="
|
153
|
+
onclick="toggleCode('M000189-source');return false;">[Source]</a></p>
|
154
|
+
<div class="method-source-code" id="M000189-source">
|
155
155
|
<pre>
|
156
156
|
<span class="ruby-comment cmt"># File lib/git/diff.rb, line 16</span>
|
157
157
|
<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
|
|
166
166
|
|
167
167
|
<h3 class="section-bar">Public Instance methods</h3>
|
168
168
|
|
169
|
-
<div id="method-
|
170
|
-
<a name="
|
169
|
+
<div id="method-M000198" class="method-detail">
|
170
|
+
<a name="M000198"></a>
|
171
171
|
|
172
172
|
<div class="method-heading">
|
173
|
-
<a href="#
|
173
|
+
<a href="#M000198" class="method-signature">
|
174
174
|
<span class="method-name">[]</span><span class="method-args">(key)</span>
|
175
175
|
</a>
|
176
176
|
</div>
|
@@ -180,8 +180,8 @@ object that holds the last X commits on given branch
|
|
180
180
|
enumerable methods
|
181
181
|
</p>
|
182
182
|
<p><a class="source-toggle" href="#"
|
183
|
-
onclick="toggleCode('
|
184
|
-
<div class="method-source-code" id="
|
183
|
+
onclick="toggleCode('M000198-source');return false;">[Source]</a></p>
|
184
|
+
<div class="method-source-code" id="M000198-source">
|
185
185
|
<pre>
|
186
186
|
<span class="ruby-comment cmt"># File lib/git/diff.rb, line 61</span>
|
187
187
|
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-identifier">key</span>)
|
@@ -193,19 +193,19 @@ enumerable methods
|
|
193
193
|
</div>
|
194
194
|
</div>
|
195
195
|
|
196
|
-
<div id="method-
|
197
|
-
<a name="
|
196
|
+
<div id="method-M000193" class="method-detail">
|
197
|
+
<a name="M000193"></a>
|
198
198
|
|
199
199
|
<div class="method-heading">
|
200
|
-
<a href="#
|
200
|
+
<a href="#M000193" class="method-signature">
|
201
201
|
<span class="method-name">deletions</span><span class="method-args">()</span>
|
202
202
|
</a>
|
203
203
|
</div>
|
204
204
|
|
205
205
|
<div class="method-description">
|
206
206
|
<p><a class="source-toggle" href="#"
|
207
|
-
onclick="toggleCode('
|
208
|
-
<div class="method-source-code" id="
|
207
|
+
onclick="toggleCode('M000193-source');return false;">[Source]</a></p>
|
208
|
+
<div class="method-source-code" id="M000193-source">
|
209
209
|
<pre>
|
210
210
|
<span class="ruby-comment cmt"># File lib/git/diff.rb, line 37</span>
|
211
211
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">deletions</span>
|
@@ -217,19 +217,19 @@ enumerable methods
|
|
217
217
|
</div>
|
218
218
|
</div>
|
219
219
|
|
220
|
-
<div id="method-
|
221
|
-
<a name="
|
220
|
+
<div id="method-M000199" class="method-detail">
|
221
|
+
<a name="M000199"></a>
|
222
222
|
|
223
223
|
<div class="method-heading">
|
224
|
-
<a href="#
|
224
|
+
<a href="#M000199" class="method-signature">
|
225
225
|
<span class="method-name">each</span><span class="method-args">() {|file[1]| ...}</span>
|
226
226
|
</a>
|
227
227
|
</div>
|
228
228
|
|
229
229
|
<div class="method-description">
|
230
230
|
<p><a class="source-toggle" href="#"
|
231
|
-
onclick="toggleCode('
|
232
|
-
<div class="method-source-code" id="
|
231
|
+
onclick="toggleCode('M000199-source');return false;">[Source]</a></p>
|
232
|
+
<div class="method-source-code" id="M000199-source">
|
233
233
|
<pre>
|
234
234
|
<span class="ruby-comment cmt"># File lib/git/diff.rb, line 66</span>
|
235
235
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each</span>
|
@@ -243,19 +243,19 @@ enumerable methods
|
|
243
243
|
</div>
|
244
244
|
</div>
|
245
245
|
|
246
|
-
<div id="method-
|
247
|
-
<a name="
|
246
|
+
<div id="method-M000194" class="method-detail">
|
247
|
+
<a name="M000194"></a>
|
248
248
|
|
249
249
|
<div class="method-heading">
|
250
|
-
<a href="#
|
250
|
+
<a href="#M000194" class="method-signature">
|
251
251
|
<span class="method-name">insertions</span><span class="method-args">()</span>
|
252
252
|
</a>
|
253
253
|
</div>
|
254
254
|
|
255
255
|
<div class="method-description">
|
256
256
|
<p><a class="source-toggle" href="#"
|
257
|
-
onclick="toggleCode('
|
258
|
-
<div class="method-source-code" id="
|
257
|
+
onclick="toggleCode('M000194-source');return false;">[Source]</a></p>
|
258
|
+
<div class="method-source-code" id="M000194-source">
|
259
259
|
<pre>
|
260
260
|
<span class="ruby-comment cmt"># File lib/git/diff.rb, line 42</span>
|
261
261
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">insertions</span>
|
@@ -267,19 +267,19 @@ enumerable methods
|
|
267
267
|
</div>
|
268
268
|
</div>
|
269
269
|
|
270
|
-
<div id="method-
|
271
|
-
<a name="
|
270
|
+
<div id="method-M000192" class="method-detail">
|
271
|
+
<a name="M000192"></a>
|
272
272
|
|
273
273
|
<div class="method-heading">
|
274
|
-
<a href="#
|
274
|
+
<a href="#M000192" class="method-signature">
|
275
275
|
<span class="method-name">lines</span><span class="method-args">()</span>
|
276
276
|
</a>
|
277
277
|
</div>
|
278
278
|
|
279
279
|
<div class="method-description">
|
280
280
|
<p><a class="source-toggle" href="#"
|
281
|
-
onclick="toggleCode('
|
282
|
-
<div class="method-source-code" id="
|
281
|
+
onclick="toggleCode('M000192-source');return false;">[Source]</a></p>
|
282
|
+
<div class="method-source-code" id="M000192-source">
|
283
283
|
<pre>
|
284
284
|
<span class="ruby-comment cmt"># File lib/git/diff.rb, line 32</span>
|
285
285
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">lines</span>
|
@@ -291,11 +291,11 @@ enumerable methods
|
|
291
291
|
</div>
|
292
292
|
</div>
|
293
293
|
|
294
|
-
<div id="method-
|
295
|
-
<a name="
|
294
|
+
<div id="method-M000196" class="method-detail">
|
295
|
+
<a name="M000196"></a>
|
296
296
|
|
297
297
|
<div class="method-heading">
|
298
|
-
<a href="#
|
298
|
+
<a href="#M000196" class="method-signature">
|
299
299
|
<span class="method-name">patch</span><span class="method-args">(file = nil)</span>
|
300
300
|
</a>
|
301
301
|
</div>
|
@@ -305,8 +305,8 @@ enumerable methods
|
|
305
305
|
if file is provided and is writable, it will write the patch into the file
|
306
306
|
</p>
|
307
307
|
<p><a class="source-toggle" href="#"
|
308
|
-
onclick="toggleCode('
|
309
|
-
<div class="method-source-code" id="
|
308
|
+
onclick="toggleCode('M000196-source');return false;">[Source]</a></p>
|
309
|
+
<div class="method-source-code" id="M000196-source">
|
310
310
|
<pre>
|
311
311
|
<span class="ruby-comment cmt"># File lib/git/diff.rb, line 53</span>
|
312
312
|
<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
|
|
318
318
|
</div>
|
319
319
|
</div>
|
320
320
|
|
321
|
-
<div id="method-
|
322
|
-
<a name="
|
321
|
+
<div id="method-M000190" class="method-detail">
|
322
|
+
<a name="M000190"></a>
|
323
323
|
|
324
324
|
<div class="method-heading">
|
325
|
-
<a href="#
|
325
|
+
<a href="#M000190" class="method-signature">
|
326
326
|
<span class="method-name">path</span><span class="method-args">(path)</span>
|
327
327
|
</a>
|
328
328
|
</div>
|
329
329
|
|
330
330
|
<div class="method-description">
|
331
331
|
<p><a class="source-toggle" href="#"
|
332
|
-
onclick="toggleCode('
|
333
|
-
<div class="method-source-code" id="
|
332
|
+
onclick="toggleCode('M000190-source');return false;">[Source]</a></p>
|
333
|
+
<div class="method-source-code" id="M000190-source">
|
334
334
|
<pre>
|
335
335
|
<span class="ruby-comment cmt"># File lib/git/diff.rb, line 22</span>
|
336
336
|
<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
|
|
342
342
|
</div>
|
343
343
|
</div>
|
344
344
|
|
345
|
-
<div id="method-
|
346
|
-
<a name="
|
345
|
+
<div id="method-M000191" class="method-detail">
|
346
|
+
<a name="M000191"></a>
|
347
347
|
|
348
348
|
<div class="method-heading">
|
349
|
-
<a href="#
|
349
|
+
<a href="#M000191" class="method-signature">
|
350
350
|
<span class="method-name">size</span><span class="method-args">()</span>
|
351
351
|
</a>
|
352
352
|
</div>
|
353
353
|
|
354
354
|
<div class="method-description">
|
355
355
|
<p><a class="source-toggle" href="#"
|
356
|
-
onclick="toggleCode('
|
357
|
-
<div class="method-source-code" id="
|
356
|
+
onclick="toggleCode('M000191-source');return false;">[Source]</a></p>
|
357
|
+
<div class="method-source-code" id="M000191-source">
|
358
358
|
<pre>
|
359
359
|
<span class="ruby-comment cmt"># File lib/git/diff.rb, line 27</span>
|
360
360
|
<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
|
|
366
366
|
</div>
|
367
367
|
</div>
|
368
368
|
|
369
|
-
<div id="method-
|
370
|
-
<a name="
|
369
|
+
<div id="method-M000195" class="method-detail">
|
370
|
+
<a name="M000195"></a>
|
371
371
|
|
372
372
|
<div class="method-heading">
|
373
|
-
<a href="#
|
373
|
+
<a href="#M000195" class="method-signature">
|
374
374
|
<span class="method-name">stats</span><span class="method-args">()</span>
|
375
375
|
</a>
|
376
376
|
</div>
|
377
377
|
|
378
378
|
<div class="method-description">
|
379
379
|
<p><a class="source-toggle" href="#"
|
380
|
-
onclick="toggleCode('
|
381
|
-
<div class="method-source-code" id="
|
380
|
+
onclick="toggleCode('M000195-source');return false;">[Source]</a></p>
|
381
|
+
<div class="method-source-code" id="M000195-source">
|
382
382
|
<pre>
|
383
383
|
<span class="ruby-comment cmt"># File lib/git/diff.rb, line 47</span>
|
384
384
|
<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
|
|
390
390
|
</div>
|
391
391
|
</div>
|
392
392
|
|
393
|
-
<div id="method-
|
394
|
-
<a name="
|
393
|
+
<div id="method-M000197" class="method-detail">
|
394
|
+
<a name="M000197"></a>
|
395
395
|
|
396
396
|
<div class="method-heading">
|
397
397
|
<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
|
|
399
399
|
|
400
400
|
<div class="method-description">
|
401
401
|
<p>
|
402
|
-
Alias for <a href="Diff.html#
|
402
|
+
Alias for <a href="Diff.html#M000196">patch</a>
|
403
403
|
</p>
|
404
404
|
</div>
|
405
405
|
</div>
|
@@ -86,8 +86,8 @@
|
|
86
86
|
<h3 class="section-bar">Methods</h3>
|
87
87
|
|
88
88
|
<div class="name-list">
|
89
|
-
<a href="#
|
90
|
-
<a href="#
|
89
|
+
<a href="#M000201">blob</a>
|
90
|
+
<a href="#M000200">new</a>
|
91
91
|
</div>
|
92
92
|
</div>
|
93
93
|
|
@@ -147,19 +147,19 @@
|
|
147
147
|
<div id="methods">
|
148
148
|
<h3 class="section-bar">Public Class methods</h3>
|
149
149
|
|
150
|
-
<div id="method-
|
151
|
-
<a name="
|
150
|
+
<div id="method-M000200" class="method-detail">
|
151
|
+
<a name="M000200"></a>
|
152
152
|
|
153
153
|
<div class="method-heading">
|
154
|
-
<a href="#
|
154
|
+
<a href="#M000200" class="method-signature">
|
155
155
|
<span class="method-name">new</span><span class="method-args">(base, hash)</span>
|
156
156
|
</a>
|
157
157
|
</div>
|
158
158
|
|
159
159
|
<div class="method-description">
|
160
160
|
<p><a class="source-toggle" href="#"
|
161
|
-
onclick="toggleCode('
|
162
|
-
<div class="method-source-code" id="
|
161
|
+
onclick="toggleCode('M000200-source');return false;">[Source]</a></p>
|
162
|
+
<div class="method-source-code" id="M000200-source">
|
163
163
|
<pre>
|
164
164
|
<span class="ruby-comment cmt"># File lib/git/diff.rb, line 77</span>
|
165
165
|
<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 @@
|
|
178
178
|
|
179
179
|
<h3 class="section-bar">Public Instance methods</h3>
|
180
180
|
|
181
|
-
<div id="method-
|
182
|
-
<a name="
|
181
|
+
<div id="method-M000201" class="method-detail">
|
182
|
+
<a name="M000201"></a>
|
183
183
|
|
184
184
|
<div class="method-heading">
|
185
|
-
<a href="#
|
185
|
+
<a href="#M000201" class="method-signature">
|
186
186
|
<span class="method-name">blob</span><span class="method-args">(type = :dst)</span>
|
187
187
|
</a>
|
188
188
|
</div>
|
189
189
|
|
190
190
|
<div class="method-description">
|
191
191
|
<p><a class="source-toggle" href="#"
|
192
|
-
onclick="toggleCode('
|
193
|
-
<div class="method-source-code" id="
|
192
|
+
onclick="toggleCode('M000201-source');return false;">[Source]</a></p>
|
193
|
+
<div class="method-source-code" id="M000201-source">
|
194
194
|
<pre>
|
195
195
|
<span class="ruby-comment cmt"># File lib/git/diff.rb, line 87</span>
|
196
196
|
<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>)
|
data/doc/classes/Git/Lib.html
CHANGED
@@ -88,52 +88,54 @@
|
|
88
88
|
<h3 class="section-bar">Methods</h3>
|
89
89
|
|
90
90
|
<div class="name-list">
|
91
|
-
<a href="#
|
92
|
-
<a href="#
|
93
|
-
<a href="#
|
94
|
-
<a href="#
|
95
|
-
<a href="#
|
96
|
-
<a href="#
|
97
|
-
<a href="#
|
98
|
-
<a href="#
|
91
|
+
<a href="#M000050">add</a>
|
92
|
+
<a href="#M000072">archive</a>
|
93
|
+
<a href="#M000039">branch_current</a>
|
94
|
+
<a href="#M000055">branch_delete</a>
|
95
|
+
<a href="#M000054">branch_new</a>
|
96
|
+
<a href="#M000038">branches_all</a>
|
97
|
+
<a href="#M000056">checkout</a>
|
98
|
+
<a href="#M000071">checkout_index</a>
|
99
99
|
<a href="#M000027">clone</a>
|
100
|
-
<a href="#
|
101
|
-
<a href="#
|
102
|
-
<a href="#
|
103
|
-
<a href="#
|
104
|
-
<a href="#
|
105
|
-
<a href="#
|
106
|
-
<a href="#
|
107
|
-
<a href="#
|
108
|
-
<a href="#
|
109
|
-
<a href="#
|
110
|
-
<a href="#
|
111
|
-
<a href="#
|
112
|
-
<a href="#
|
100
|
+
<a href="#M000052">commit</a>
|
101
|
+
<a href="#M000034">commit_data</a>
|
102
|
+
<a href="#M000069">commit_tree</a>
|
103
|
+
<a href="#M000047">config_get</a>
|
104
|
+
<a href="#M000048">config_list</a>
|
105
|
+
<a href="#M000046">config_remote</a>
|
106
|
+
<a href="#M000049">config_set</a>
|
107
|
+
<a href="#M000043">diff_files</a>
|
108
|
+
<a href="#M000041">diff_full</a>
|
109
|
+
<a href="#M000044">diff_index</a>
|
110
|
+
<a href="#M000042">diff_stats</a>
|
111
|
+
<a href="#M000063">fetch</a>
|
112
|
+
<a href="#M000029">full_log_commits</a>
|
113
|
+
<a href="#M000040">grep</a>
|
113
114
|
<a href="#M000026">init</a>
|
114
115
|
<a href="#M000028">log_commits</a>
|
115
|
-
<a href="#
|
116
|
-
<a href="#
|
117
|
-
<a href="#
|
118
|
-
<a href="#
|
116
|
+
<a href="#M000045">ls_files</a>
|
117
|
+
<a href="#M000037">ls_tree</a>
|
118
|
+
<a href="#M000057">merge</a>
|
119
|
+
<a href="#M000031">namerev</a>
|
119
120
|
<a href="#M000025">new</a>
|
120
|
-
<a href="#
|
121
|
-
<a href="#
|
122
|
-
<a href="#
|
123
|
-
<a href="#
|
124
|
-
<a href="#
|
125
|
-
<a href="#
|
126
|
-
<a href="#
|
127
|
-
<a href="#
|
128
|
-
<a href="#
|
129
|
-
<a href="#
|
130
|
-
<a href="#
|
131
|
-
<a href="#
|
132
|
-
<a href="#
|
133
|
-
<a href="#
|
134
|
-
<a href="#
|
135
|
-
<a href="#
|
136
|
-
<a href="#
|
121
|
+
<a href="#M000036">object_contents</a>
|
122
|
+
<a href="#M000033">object_size</a>
|
123
|
+
<a href="#M000032">object_type</a>
|
124
|
+
<a href="#M000035">process_commit_data</a>
|
125
|
+
<a href="#M000064">push</a>
|
126
|
+
<a href="#M000067">read_tree</a>
|
127
|
+
<a href="#M000058">remote_add</a>
|
128
|
+
<a href="#M000059">remote_remove</a>
|
129
|
+
<a href="#M000060">remotes</a>
|
130
|
+
<a href="#M000051">remove</a>
|
131
|
+
<a href="#M000066">repack</a>
|
132
|
+
<a href="#M000053">reset</a>
|
133
|
+
<a href="#M000030">revparse</a>
|
134
|
+
<a href="#M000062">tag</a>
|
135
|
+
<a href="#M000065">tag_sha</a>
|
136
|
+
<a href="#M000061">tags</a>
|
137
|
+
<a href="#M000070">update_ref</a>
|
138
|
+
<a href="#M000068">write_tree</a>
|
137
139
|
</div>
|
138
140
|
</div>
|
139
141
|
|
@@ -188,21 +190,21 @@
|
|
188
190
|
|
189
191
|
<h3 class="section-bar">Public Instance methods</h3>
|
190
192
|
|
191
|
-
<div id="method-
|
192
|
-
<a name="
|
193
|
+
<div id="method-M000050" class="method-detail">
|
194
|
+
<a name="M000050"></a>
|
193
195
|
|
194
196
|
<div class="method-heading">
|
195
|
-
<a href="#
|
197
|
+
<a href="#M000050" class="method-signature">
|
196
198
|
<span class="method-name">add</span><span class="method-args">(path = '.')</span>
|
197
199
|
</a>
|
198
200
|
</div>
|
199
201
|
|
200
202
|
<div class="method-description">
|
201
203
|
<p><a class="source-toggle" href="#"
|
202
|
-
onclick="toggleCode('
|
203
|
-
<div class="method-source-code" id="
|
204
|
+
onclick="toggleCode('M000050-source');return false;">[Source]</a></p>
|
205
|
+
<div class="method-source-code" id="M000050-source">
|
204
206
|
<pre>
|
205
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
207
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 296</span>
|
206
208
|
<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>)
|
207
209
|
<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>)
|
208
210
|
<span class="ruby-identifier">command</span>(<span class="ruby-value str">'add'</span>, <span class="ruby-identifier">path</span>)
|
@@ -212,11 +214,11 @@
|
|
212
214
|
</div>
|
213
215
|
</div>
|
214
216
|
|
215
|
-
<div id="method-
|
216
|
-
<a name="
|
217
|
+
<div id="method-M000072" class="method-detail">
|
218
|
+
<a name="M000072"></a>
|
217
219
|
|
218
220
|
<div class="method-heading">
|
219
|
-
<a href="#
|
221
|
+
<a href="#M000072" class="method-signature">
|
220
222
|
<span class="method-name">archive</span><span class="method-args">(sha, file = nil, opts = {})</span>
|
221
223
|
</a>
|
222
224
|
</div>
|
@@ -235,10 +237,10 @@ options
|
|
235
237
|
:path
|
236
238
|
</pre>
|
237
239
|
<p><a class="source-toggle" href="#"
|
238
|
-
onclick="toggleCode('
|
239
|
-
<div class="method-source-code" id="
|
240
|
+
onclick="toggleCode('M000072-source');return false;">[Source]</a></p>
|
241
|
+
<div class="method-source-code" id="M000072-source">
|
240
242
|
<pre>
|
241
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
243
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 438</span>
|
242
244
|
<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> = {})
|
243
245
|
<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>]
|
244
246
|
|
@@ -267,21 +269,21 @@ options
|
|
267
269
|
</div>
|
268
270
|
</div>
|
269
271
|
|
270
|
-
<div id="method-
|
271
|
-
<a name="
|
272
|
+
<div id="method-M000039" class="method-detail">
|
273
|
+
<a name="M000039"></a>
|
272
274
|
|
273
275
|
<div class="method-heading">
|
274
|
-
<a href="#
|
276
|
+
<a href="#M000039" class="method-signature">
|
275
277
|
<span class="method-name">branch_current</span><span class="method-args">()</span>
|
276
278
|
</a>
|
277
279
|
</div>
|
278
280
|
|
279
281
|
<div class="method-description">
|
280
282
|
<p><a class="source-toggle" href="#"
|
281
|
-
onclick="toggleCode('
|
282
|
-
<div class="method-source-code" id="
|
283
|
+
onclick="toggleCode('M000039-source');return false;">[Source]</a></p>
|
284
|
+
<div class="method-source-code" id="M000039-source">
|
283
285
|
<pre>
|
284
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
286
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 177</span>
|
285
287
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">branch_current</span>
|
286
288
|
<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>
|
287
289
|
<span class="ruby-keyword kw">end</span>
|
@@ -290,21 +292,21 @@ options
|
|
290
292
|
</div>
|
291
293
|
</div>
|
292
294
|
|
293
|
-
<div id="method-
|
294
|
-
<a name="
|
295
|
+
<div id="method-M000055" class="method-detail">
|
296
|
+
<a name="M000055"></a>
|
295
297
|
|
296
298
|
<div class="method-heading">
|
297
|
-
<a href="#
|
299
|
+
<a href="#M000055" class="method-signature">
|
298
300
|
<span class="method-name">branch_delete</span><span class="method-args">(branch)</span>
|
299
301
|
</a>
|
300
302
|
</div>
|
301
303
|
|
302
304
|
<div class="method-description">
|
303
305
|
<p><a class="source-toggle" href="#"
|
304
|
-
onclick="toggleCode('
|
305
|
-
<div class="method-source-code" id="
|
306
|
+
onclick="toggleCode('M000055-source');return false;">[Source]</a></p>
|
307
|
+
<div class="method-source-code" id="M000055-source">
|
306
308
|
<pre>
|
307
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
309
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 329</span>
|
308
310
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">branch_delete</span>(<span class="ruby-identifier">branch</span>)
|
309
311
|
<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>])
|
310
312
|
<span class="ruby-keyword kw">end</span>
|
@@ -313,21 +315,21 @@ options
|
|
313
315
|
</div>
|
314
316
|
</div>
|
315
317
|
|
316
|
-
<div id="method-
|
317
|
-
<a name="
|
318
|
+
<div id="method-M000054" class="method-detail">
|
319
|
+
<a name="M000054"></a>
|
318
320
|
|
319
321
|
<div class="method-heading">
|
320
|
-
<a href="#
|
322
|
+
<a href="#M000054" class="method-signature">
|
321
323
|
<span class="method-name">branch_new</span><span class="method-args">(branch)</span>
|
322
324
|
</a>
|
323
325
|
</div>
|
324
326
|
|
325
327
|
<div class="method-description">
|
326
328
|
<p><a class="source-toggle" href="#"
|
327
|
-
onclick="toggleCode('
|
328
|
-
<div class="method-source-code" id="
|
329
|
+
onclick="toggleCode('M000054-source');return false;">[Source]</a></p>
|
330
|
+
<div class="method-source-code" id="M000054-source">
|
329
331
|
<pre>
|
330
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
332
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 325</span>
|
331
333
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">branch_new</span>(<span class="ruby-identifier">branch</span>)
|
332
334
|
<span class="ruby-identifier">command</span>(<span class="ruby-value str">'branch'</span>, <span class="ruby-identifier">branch</span>)
|
333
335
|
<span class="ruby-keyword kw">end</span>
|
@@ -336,21 +338,21 @@ options
|
|
336
338
|
</div>
|
337
339
|
</div>
|
338
340
|
|
339
|
-
<div id="method-
|
340
|
-
<a name="
|
341
|
+
<div id="method-M000038" class="method-detail">
|
342
|
+
<a name="M000038"></a>
|
341
343
|
|
342
344
|
<div class="method-heading">
|
343
|
-
<a href="#
|
345
|
+
<a href="#M000038" class="method-signature">
|
344
346
|
<span class="method-name">branches_all</span><span class="method-args">()</span>
|
345
347
|
</a>
|
346
348
|
</div>
|
347
349
|
|
348
350
|
<div class="method-description">
|
349
351
|
<p><a class="source-toggle" href="#"
|
350
|
-
onclick="toggleCode('
|
351
|
-
<div class="method-source-code" id="
|
352
|
+
onclick="toggleCode('M000038-source');return false;">[Source]</a></p>
|
353
|
+
<div class="method-source-code" id="M000038-source">
|
352
354
|
<pre>
|
353
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
355
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 167</span>
|
354
356
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">branches_all</span>
|
355
357
|
<span class="ruby-identifier">arr</span> = []
|
356
358
|
<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>
|
@@ -365,21 +367,21 @@ options
|
|
365
367
|
</div>
|
366
368
|
</div>
|
367
369
|
|
368
|
-
<div id="method-
|
369
|
-
<a name="
|
370
|
+
<div id="method-M000056" class="method-detail">
|
371
|
+
<a name="M000056"></a>
|
370
372
|
|
371
373
|
<div class="method-heading">
|
372
|
-
<a href="#
|
374
|
+
<a href="#M000056" class="method-signature">
|
373
375
|
<span class="method-name">checkout</span><span class="method-args">(branch, opts = {})</span>
|
374
376
|
</a>
|
375
377
|
</div>
|
376
378
|
|
377
379
|
<div class="method-description">
|
378
380
|
<p><a class="source-toggle" href="#"
|
379
|
-
onclick="toggleCode('
|
380
|
-
<div class="method-source-code" id="
|
381
|
+
onclick="toggleCode('M000056-source');return false;">[Source]</a></p>
|
382
|
+
<div class="method-source-code" id="M000056-source">
|
381
383
|
<pre>
|
382
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
384
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 333</span>
|
383
385
|
<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> = {})
|
384
386
|
<span class="ruby-identifier">arr_opts</span> = []
|
385
387
|
<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>]
|
@@ -392,21 +394,21 @@ options
|
|
392
394
|
</div>
|
393
395
|
</div>
|
394
396
|
|
395
|
-
<div id="method-
|
396
|
-
<a name="
|
397
|
+
<div id="method-M000071" class="method-detail">
|
398
|
+
<a name="M000071"></a>
|
397
399
|
|
398
400
|
<div class="method-heading">
|
399
|
-
<a href="#
|
401
|
+
<a href="#M000071" class="method-signature">
|
400
402
|
<span class="method-name">checkout_index</span><span class="method-args">(opts = {})</span>
|
401
403
|
</a>
|
402
404
|
</div>
|
403
405
|
|
404
406
|
<div class="method-description">
|
405
407
|
<p><a class="source-toggle" href="#"
|
406
|
-
onclick="toggleCode('
|
407
|
-
<div class="method-source-code" id="
|
408
|
+
onclick="toggleCode('M000071-source');return false;">[Source]</a></p>
|
409
|
+
<div class="method-source-code" id="M000071-source">
|
408
410
|
<pre>
|
409
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
411
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 422</span>
|
410
412
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">checkout_index</span>(<span class="ruby-identifier">opts</span> = {})
|
411
413
|
<span class="ruby-identifier">arr_opts</span> = []
|
412
414
|
<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>]
|
@@ -473,21 +475,21 @@ TODO - make this work with SSH password or auth_key
|
|
473
475
|
</div>
|
474
476
|
</div>
|
475
477
|
|
476
|
-
<div id="method-
|
477
|
-
<a name="
|
478
|
+
<div id="method-M000052" class="method-detail">
|
479
|
+
<a name="M000052"></a>
|
478
480
|
|
479
481
|
<div class="method-heading">
|
480
|
-
<a href="#
|
482
|
+
<a href="#M000052" class="method-signature">
|
481
483
|
<span class="method-name">commit</span><span class="method-args">(message, opts = {})</span>
|
482
484
|
</a>
|
483
485
|
</div>
|
484
486
|
|
485
487
|
<div class="method-description">
|
486
488
|
<p><a class="source-toggle" href="#"
|
487
|
-
onclick="toggleCode('
|
488
|
-
<div class="method-source-code" id="
|
489
|
+
onclick="toggleCode('M000052-source');return false;">[Source]</a></p>
|
490
|
+
<div class="method-source-code" id="M000052-source">
|
489
491
|
<pre>
|
490
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
492
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 311</span>
|
491
493
|
<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> = {})
|
492
494
|
<span class="ruby-identifier">arr_opts</span> = [<span class="ruby-node">"-m '#{message}'"</span>]
|
493
495
|
<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>]
|
@@ -498,11 +500,11 @@ TODO - make this work with SSH password or auth_key
|
|
498
500
|
</div>
|
499
501
|
</div>
|
500
502
|
|
501
|
-
<div id="method-
|
502
|
-
<a name="
|
503
|
+
<div id="method-M000034" class="method-detail">
|
504
|
+
<a name="M000034"></a>
|
503
505
|
|
504
506
|
<div class="method-heading">
|
505
|
-
<a href="#
|
507
|
+
<a href="#M000034" class="method-signature">
|
506
508
|
<span class="method-name">commit_data</span><span class="method-args">(sha)</span>
|
507
509
|
</a>
|
508
510
|
</div>
|
@@ -512,54 +514,35 @@ TODO - make this work with SSH password or auth_key
|
|
512
514
|
returns useful array of raw commit object data
|
513
515
|
</p>
|
514
516
|
<p><a class="source-toggle" href="#"
|
515
|
-
onclick="toggleCode('
|
516
|
-
<div class="method-source-code" id="
|
517
|
+
onclick="toggleCode('M000034-source');return false;">[Source]</a></p>
|
518
|
+
<div class="method-source-code" id="M000034-source">
|
517
519
|
<pre>
|
518
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
520
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 104</span>
|
519
521
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">commit_data</span>(<span class="ruby-identifier">sha</span>)
|
520
|
-
<span class="ruby-identifier">
|
521
|
-
|
522
|
-
<span class="ruby-identifier">
|
523
|
-
<span class="ruby-identifier">command_lines</span>(<span class="ruby-value str">'cat-file'</span>, [<span class="ruby-value str">'commit'</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>
|
524
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">in_message</span>
|
525
|
-
<span class="ruby-identifier">hsh</span>[<span class="ruby-value str">'message'</span>] <span class="ruby-operator">+=</span> <span class="ruby-identifier">line</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"\n"</span>
|
526
|
-
<span class="ruby-keyword kw">end</span>
|
527
|
-
|
528
|
-
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">line</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">''</span>) <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">in_message</span>
|
529
|
-
<span class="ruby-identifier">data</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>
|
530
|
-
<span class="ruby-identifier">key</span> = <span class="ruby-identifier">data</span>.<span class="ruby-identifier">shift</span>
|
531
|
-
<span class="ruby-identifier">value</span> = <span class="ruby-identifier">data</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>)
|
532
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">key</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'parent'</span>
|
533
|
-
<span class="ruby-identifier">hsh</span>[<span class="ruby-identifier">key</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">value</span>
|
534
|
-
<span class="ruby-keyword kw">else</span>
|
535
|
-
<span class="ruby-identifier">hsh</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">value</span>
|
536
|
-
<span class="ruby-keyword kw">end</span>
|
537
|
-
<span class="ruby-keyword kw">else</span>
|
538
|
-
<span class="ruby-identifier">in_message</span> = <span class="ruby-keyword kw">true</span>
|
539
|
-
<span class="ruby-keyword kw">end</span>
|
540
|
-
<span class="ruby-keyword kw">end</span>
|
541
|
-
<span class="ruby-identifier">hsh</span>
|
522
|
+
<span class="ruby-identifier">sha</span> = <span class="ruby-identifier">sha</span>.<span class="ruby-identifier">to_s</span>
|
523
|
+
<span class="ruby-identifier">cdata</span> = <span class="ruby-identifier">command_lines</span>(<span class="ruby-value str">'cat-file'</span>, [<span class="ruby-value str">'commit'</span>, <span class="ruby-identifier">sha</span>])
|
524
|
+
<span class="ruby-identifier">process_commit_data</span>(<span class="ruby-identifier">cdata</span>, <span class="ruby-identifier">sha</span>)
|
542
525
|
<span class="ruby-keyword kw">end</span>
|
543
526
|
</pre>
|
544
527
|
</div>
|
545
528
|
</div>
|
546
529
|
</div>
|
547
530
|
|
548
|
-
<div id="method-
|
549
|
-
<a name="
|
531
|
+
<div id="method-M000069" class="method-detail">
|
532
|
+
<a name="M000069"></a>
|
550
533
|
|
551
534
|
<div class="method-heading">
|
552
|
-
<a href="#
|
535
|
+
<a href="#M000069" class="method-signature">
|
553
536
|
<span class="method-name">commit_tree</span><span class="method-args">(tree, opts = {})</span>
|
554
537
|
</a>
|
555
538
|
</div>
|
556
539
|
|
557
540
|
<div class="method-description">
|
558
541
|
<p><a class="source-toggle" href="#"
|
559
|
-
onclick="toggleCode('
|
560
|
-
<div class="method-source-code" id="
|
542
|
+
onclick="toggleCode('M000069-source');return false;">[Source]</a></p>
|
543
|
+
<div class="method-source-code" id="M000069-source">
|
561
544
|
<pre>
|
562
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
545
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 404</span>
|
563
546
|
<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> = {})
|
564
547
|
<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>]
|
565
548
|
<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>
|
@@ -578,21 +561,21 @@ returns useful array of raw commit object data
|
|
578
561
|
</div>
|
579
562
|
</div>
|
580
563
|
|
581
|
-
<div id="method-
|
582
|
-
<a name="
|
564
|
+
<div id="method-M000047" class="method-detail">
|
565
|
+
<a name="M000047"></a>
|
583
566
|
|
584
567
|
<div class="method-heading">
|
585
|
-
<a href="#
|
568
|
+
<a href="#M000047" class="method-signature">
|
586
569
|
<span class="method-name">config_get</span><span class="method-args">(name)</span>
|
587
570
|
</a>
|
588
571
|
</div>
|
589
572
|
|
590
573
|
<div class="method-description">
|
591
574
|
<p><a class="source-toggle" href="#"
|
592
|
-
onclick="toggleCode('
|
593
|
-
<div class="method-source-code" id="
|
575
|
+
onclick="toggleCode('M000047-source');return false;">[Source]</a></p>
|
576
|
+
<div class="method-source-code" id="M000047-source">
|
594
577
|
<pre>
|
595
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
578
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 277</span>
|
596
579
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">config_get</span>(<span class="ruby-identifier">name</span>)
|
597
580
|
<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>])
|
598
581
|
<span class="ruby-keyword kw">end</span>
|
@@ -601,21 +584,21 @@ returns useful array of raw commit object data
|
|
601
584
|
</div>
|
602
585
|
</div>
|
603
586
|
|
604
|
-
<div id="method-
|
605
|
-
<a name="
|
587
|
+
<div id="method-M000048" class="method-detail">
|
588
|
+
<a name="M000048"></a>
|
606
589
|
|
607
590
|
<div class="method-heading">
|
608
|
-
<a href="#
|
591
|
+
<a href="#M000048" class="method-signature">
|
609
592
|
<span class="method-name">config_list</span><span class="method-args">()</span>
|
610
593
|
</a>
|
611
594
|
</div>
|
612
595
|
|
613
596
|
<div class="method-description">
|
614
597
|
<p><a class="source-toggle" href="#"
|
615
|
-
onclick="toggleCode('
|
616
|
-
<div class="method-source-code" id="
|
598
|
+
onclick="toggleCode('M000048-source');return false;">[Source]</a></p>
|
599
|
+
<div class="method-source-code" id="M000048-source">
|
617
600
|
<pre>
|
618
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
601
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 281</span>
|
619
602
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">config_list</span>
|
620
603
|
<span class="ruby-identifier">hsh</span> = {}
|
621
604
|
<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>
|
@@ -629,21 +612,21 @@ returns useful array of raw commit object data
|
|
629
612
|
</div>
|
630
613
|
</div>
|
631
614
|
|
632
|
-
<div id="method-
|
633
|
-
<a name="
|
615
|
+
<div id="method-M000046" class="method-detail">
|
616
|
+
<a name="M000046"></a>
|
634
617
|
|
635
618
|
<div class="method-heading">
|
636
|
-
<a href="#
|
619
|
+
<a href="#M000046" class="method-signature">
|
637
620
|
<span class="method-name">config_remote</span><span class="method-args">(name)</span>
|
638
621
|
</a>
|
639
622
|
</div>
|
640
623
|
|
641
624
|
<div class="method-description">
|
642
625
|
<p><a class="source-toggle" href="#"
|
643
|
-
onclick="toggleCode('
|
644
|
-
<div class="method-source-code" id="
|
626
|
+
onclick="toggleCode('M000046-source');return false;">[Source]</a></p>
|
627
|
+
<div class="method-source-code" id="M000046-source">
|
645
628
|
<pre>
|
646
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
629
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 268</span>
|
647
630
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">config_remote</span>(<span class="ruby-identifier">name</span>)
|
648
631
|
<span class="ruby-identifier">hsh</span> = {}
|
649
632
|
<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>
|
@@ -657,11 +640,11 @@ returns useful array of raw commit object data
|
|
657
640
|
</div>
|
658
641
|
</div>
|
659
642
|
|
660
|
-
<div id="method-
|
661
|
-
<a name="
|
643
|
+
<div id="method-M000049" class="method-detail">
|
644
|
+
<a name="M000049"></a>
|
662
645
|
|
663
646
|
<div class="method-heading">
|
664
|
-
<a href="#
|
647
|
+
<a href="#M000049" class="method-signature">
|
665
648
|
<span class="method-name">config_set</span><span class="method-args">(name, value)</span>
|
666
649
|
</a>
|
667
650
|
</div>
|
@@ -671,10 +654,10 @@ returns useful array of raw commit object data
|
|
671
654
|
WRITE COMMANDS ##
|
672
655
|
</p>
|
673
656
|
<p><a class="source-toggle" href="#"
|
674
|
-
onclick="toggleCode('
|
675
|
-
<div class="method-source-code" id="
|
657
|
+
onclick="toggleCode('M000049-source');return false;">[Source]</a></p>
|
658
|
+
<div class="method-source-code" id="M000049-source">
|
676
659
|
<pre>
|
677
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
660
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 292</span>
|
678
661
|
<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>)
|
679
662
|
<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>])
|
680
663
|
<span class="ruby-keyword kw">end</span>
|
@@ -683,11 +666,11 @@ WRITE COMMANDS ##
|
|
683
666
|
</div>
|
684
667
|
</div>
|
685
668
|
|
686
|
-
<div id="method-
|
687
|
-
<a name="
|
669
|
+
<div id="method-M000043" class="method-detail">
|
670
|
+
<a name="M000043"></a>
|
688
671
|
|
689
672
|
<div class="method-heading">
|
690
|
-
<a href="#
|
673
|
+
<a href="#M000043" class="method-signature">
|
691
674
|
<span class="method-name">diff_files</span><span class="method-args">()</span>
|
692
675
|
</a>
|
693
676
|
</div>
|
@@ -697,10 +680,10 @@ WRITE COMMANDS ##
|
|
697
680
|
compares the index and the working directory
|
698
681
|
</p>
|
699
682
|
<p><a class="source-toggle" href="#"
|
700
|
-
onclick="toggleCode('
|
701
|
-
<div class="method-source-code" id="
|
683
|
+
onclick="toggleCode('M000043-source');return false;">[Source]</a></p>
|
684
|
+
<div class="method-source-code" id="M000043-source">
|
702
685
|
<pre>
|
703
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
686
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 234</span>
|
704
687
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">diff_files</span>
|
705
688
|
<span class="ruby-identifier">hsh</span> = {}
|
706
689
|
<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>
|
@@ -716,21 +699,21 @@ compares the index and the working directory
|
|
716
699
|
</div>
|
717
700
|
</div>
|
718
701
|
|
719
|
-
<div id="method-
|
720
|
-
<a name="
|
702
|
+
<div id="method-M000041" class="method-detail">
|
703
|
+
<a name="M000041"></a>
|
721
704
|
|
722
705
|
<div class="method-heading">
|
723
|
-
<a href="#
|
706
|
+
<a href="#M000041" class="method-signature">
|
724
707
|
<span class="method-name">diff_full</span><span class="method-args">(obj1 = 'HEAD', obj2 = nil, opts = {})</span>
|
725
708
|
</a>
|
726
709
|
</div>
|
727
710
|
|
728
711
|
<div class="method-description">
|
729
712
|
<p><a class="source-toggle" href="#"
|
730
|
-
onclick="toggleCode('
|
731
|
-
<div class="method-source-code" id="
|
713
|
+
onclick="toggleCode('M000041-source');return false;">[Source]</a></p>
|
714
|
+
<div class="method-source-code" id="M000041-source">
|
732
715
|
<pre>
|
733
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
716
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 204</span>
|
734
717
|
<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> = {})
|
735
718
|
<span class="ruby-identifier">diff_opts</span> = [<span class="ruby-value str">'-p'</span>]
|
736
719
|
<span class="ruby-identifier">diff_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">obj1</span>
|
@@ -744,11 +727,11 @@ compares the index and the working directory
|
|
744
727
|
</div>
|
745
728
|
</div>
|
746
729
|
|
747
|
-
<div id="method-
|
748
|
-
<a name="
|
730
|
+
<div id="method-M000044" class="method-detail">
|
731
|
+
<a name="M000044"></a>
|
749
732
|
|
750
733
|
<div class="method-heading">
|
751
|
-
<a href="#
|
734
|
+
<a href="#M000044" class="method-signature">
|
752
735
|
<span class="method-name">diff_index</span><span class="method-args">(treeish)</span>
|
753
736
|
</a>
|
754
737
|
</div>
|
@@ -758,10 +741,10 @@ compares the index and the working directory
|
|
758
741
|
compares the index and the repository
|
759
742
|
</p>
|
760
743
|
<p><a class="source-toggle" href="#"
|
761
|
-
onclick="toggleCode('
|
762
|
-
<div class="method-source-code" id="
|
744
|
+
onclick="toggleCode('M000044-source');return false;">[Source]</a></p>
|
745
|
+
<div class="method-source-code" id="M000044-source">
|
763
746
|
<pre>
|
764
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
747
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 246</span>
|
765
748
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">diff_index</span>(<span class="ruby-identifier">treeish</span>)
|
766
749
|
<span class="ruby-identifier">hsh</span> = {}
|
767
750
|
<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>
|
@@ -777,21 +760,21 @@ compares the index and the repository
|
|
777
760
|
</div>
|
778
761
|
</div>
|
779
762
|
|
780
|
-
<div id="method-
|
781
|
-
<a name="
|
763
|
+
<div id="method-M000042" class="method-detail">
|
764
|
+
<a name="M000042"></a>
|
782
765
|
|
783
766
|
<div class="method-heading">
|
784
|
-
<a href="#
|
767
|
+
<a href="#M000042" class="method-signature">
|
785
768
|
<span class="method-name">diff_stats</span><span class="method-args">(obj1 = 'HEAD', obj2 = nil, opts = {})</span>
|
786
769
|
</a>
|
787
770
|
</div>
|
788
771
|
|
789
772
|
<div class="method-description">
|
790
773
|
<p><a class="source-toggle" href="#"
|
791
|
-
onclick="toggleCode('
|
792
|
-
<div class="method-source-code" id="
|
774
|
+
onclick="toggleCode('M000042-source');return false;">[Source]</a></p>
|
775
|
+
<div class="method-source-code" id="M000042-source">
|
793
776
|
<pre>
|
794
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
777
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 213</span>
|
795
778
|
<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> = {})
|
796
779
|
<span class="ruby-identifier">diff_opts</span> = [<span class="ruby-value str">'--numstat'</span>]
|
797
780
|
<span class="ruby-identifier">diff_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">obj1</span>
|
@@ -816,21 +799,21 @@ compares the index and the repository
|
|
816
799
|
</div>
|
817
800
|
</div>
|
818
801
|
|
819
|
-
<div id="method-
|
820
|
-
<a name="
|
802
|
+
<div id="method-M000063" class="method-detail">
|
803
|
+
<a name="M000063"></a>
|
821
804
|
|
822
805
|
<div class="method-heading">
|
823
|
-
<a href="#
|
806
|
+
<a href="#M000063" class="method-signature">
|
824
807
|
<span class="method-name">fetch</span><span class="method-args">(remote)</span>
|
825
808
|
</a>
|
826
809
|
</div>
|
827
810
|
|
828
811
|
<div class="method-description">
|
829
812
|
<p><a class="source-toggle" href="#"
|
830
|
-
onclick="toggleCode('
|
831
|
-
<div class="method-source-code" id="
|
813
|
+
onclick="toggleCode('M000063-source');return false;">[Source]</a></p>
|
814
|
+
<div class="method-source-code" id="M000063-source">
|
832
815
|
<pre>
|
833
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
816
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 376</span>
|
834
817
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fetch</span>(<span class="ruby-identifier">remote</span>)
|
835
818
|
<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>)
|
836
819
|
<span class="ruby-keyword kw">end</span>
|
@@ -839,11 +822,42 @@ compares the index and the repository
|
|
839
822
|
</div>
|
840
823
|
</div>
|
841
824
|
|
842
|
-
<div id="method-
|
843
|
-
<a name="
|
825
|
+
<div id="method-M000029" class="method-detail">
|
826
|
+
<a name="M000029"></a>
|
844
827
|
|
845
828
|
<div class="method-heading">
|
846
|
-
<a href="#
|
829
|
+
<a href="#M000029" class="method-signature">
|
830
|
+
<span class="method-name">full_log_commits</span><span class="method-args">(opts = {})</span>
|
831
|
+
</a>
|
832
|
+
</div>
|
833
|
+
|
834
|
+
<div class="method-description">
|
835
|
+
<p><a class="source-toggle" href="#"
|
836
|
+
onclick="toggleCode('M000029-source');return false;">[Source]</a></p>
|
837
|
+
<div class="method-source-code" id="M000029-source">
|
838
|
+
<pre>
|
839
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 72</span>
|
840
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">full_log_commits</span>(<span class="ruby-identifier">opts</span> = {})
|
841
|
+
<span class="ruby-identifier">arr_opts</span> = [<span class="ruby-value str">'--pretty=raw'</span>]
|
842
|
+
<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>]
|
843
|
+
<span class="ruby-identifier">arr_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"--since=\"#{opts[:since]}\""</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:since</span>].<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">String</span>
|
844
|
+
<span class="ruby-identifier">arr_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{opts[:between][0].to_s}..#{opts[:between][1].to_s}"</span> <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:between</span>] <span class="ruby-operator">&&</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:between</span>].<span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">2</span>)
|
845
|
+
<span class="ruby-identifier">arr_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:object</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:object</span>].<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">String</span>
|
846
|
+
<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>
|
847
|
+
|
848
|
+
<span class="ruby-identifier">full_log</span> = <span class="ruby-identifier">command_lines</span>(<span class="ruby-value str">'log'</span>, <span class="ruby-identifier">arr_opts</span>, <span class="ruby-keyword kw">true</span>)
|
849
|
+
<span class="ruby-identifier">process_commit_data</span>(<span class="ruby-identifier">full_log</span>)
|
850
|
+
<span class="ruby-keyword kw">end</span>
|
851
|
+
</pre>
|
852
|
+
</div>
|
853
|
+
</div>
|
854
|
+
</div>
|
855
|
+
|
856
|
+
<div id="method-M000040" class="method-detail">
|
857
|
+
<a name="M000040"></a>
|
858
|
+
|
859
|
+
<div class="method-heading">
|
860
|
+
<a href="#M000040" class="method-signature">
|
847
861
|
<span class="method-name">grep</span><span class="method-args">(string, opts = {})</span>
|
848
862
|
</a>
|
849
863
|
</div>
|
@@ -861,10 +875,10 @@ returns hash
|
|
861
875
|
</dd>
|
862
876
|
</dl>
|
863
877
|
<p><a class="source-toggle" href="#"
|
864
|
-
onclick="toggleCode('
|
865
|
-
<div class="method-source-code" id="
|
878
|
+
onclick="toggleCode('M000040-source');return false;">[Source]</a></p>
|
879
|
+
<div class="method-source-code" id="M000040-source">
|
866
880
|
<pre>
|
867
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
881
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 185</span>
|
868
882
|
<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> = {})
|
869
883
|
<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>]
|
870
884
|
|
@@ -933,32 +947,32 @@ READ COMMANDS ##
|
|
933
947
|
<span class="ruby-identifier">arr_opts</span> = [<span class="ruby-value str">'--pretty=oneline'</span>]
|
934
948
|
<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>]
|
935
949
|
<span class="ruby-identifier">arr_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"--since=\"#{opts[:since]}\""</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:since</span>].<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">String</span>
|
936
|
-
<span class="ruby-identifier">arr_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{opts[:between][0]}..#{opts[:between][1].to_s}"</span> <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:between</span>] <span class="ruby-operator">&&</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:between</span>].<span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">2</span>)
|
950
|
+
<span class="ruby-identifier">arr_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{opts[:between][0].to_s}..#{opts[:between][1].to_s}"</span> <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:between</span>] <span class="ruby-operator">&&</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:between</span>].<span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">2</span>)
|
937
951
|
<span class="ruby-identifier">arr_opts</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:object</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:object</span>].<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">String</span>
|
938
952
|
<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>
|
939
953
|
|
940
|
-
<span class="ruby-identifier">command_lines</span>(<span class="ruby-value str">'log'</span>, <span class="ruby-identifier">arr_opts</span>).<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">split</span>.<span class="ruby-identifier">first</span> }
|
954
|
+
<span class="ruby-identifier">command_lines</span>(<span class="ruby-value str">'log'</span>, <span class="ruby-identifier">arr_opts</span>, <span class="ruby-keyword kw">true</span>).<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">split</span>.<span class="ruby-identifier">first</span> }
|
941
955
|
<span class="ruby-keyword kw">end</span>
|
942
956
|
</pre>
|
943
957
|
</div>
|
944
958
|
</div>
|
945
959
|
</div>
|
946
960
|
|
947
|
-
<div id="method-
|
948
|
-
<a name="
|
961
|
+
<div id="method-M000045" class="method-detail">
|
962
|
+
<a name="M000045"></a>
|
949
963
|
|
950
964
|
<div class="method-heading">
|
951
|
-
<a href="#
|
965
|
+
<a href="#M000045" class="method-signature">
|
952
966
|
<span class="method-name">ls_files</span><span class="method-args">()</span>
|
953
967
|
</a>
|
954
968
|
</div>
|
955
969
|
|
956
970
|
<div class="method-description">
|
957
971
|
<p><a class="source-toggle" href="#"
|
958
|
-
onclick="toggleCode('
|
959
|
-
<div class="method-source-code" id="
|
972
|
+
onclick="toggleCode('M000045-source');return false;">[Source]</a></p>
|
973
|
+
<div class="method-source-code" id="M000045-source">
|
960
974
|
<pre>
|
961
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
975
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 257</span>
|
962
976
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ls_files</span>
|
963
977
|
<span class="ruby-identifier">hsh</span> = {}
|
964
978
|
<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>
|
@@ -973,21 +987,21 @@ READ COMMANDS ##
|
|
973
987
|
</div>
|
974
988
|
</div>
|
975
989
|
|
976
|
-
<div id="method-
|
977
|
-
<a name="
|
990
|
+
<div id="method-M000037" class="method-detail">
|
991
|
+
<a name="M000037"></a>
|
978
992
|
|
979
993
|
<div class="method-heading">
|
980
|
-
<a href="#
|
994
|
+
<a href="#M000037" class="method-signature">
|
981
995
|
<span class="method-name">ls_tree</span><span class="method-args">(sha)</span>
|
982
996
|
</a>
|
983
997
|
</div>
|
984
998
|
|
985
999
|
<div class="method-description">
|
986
1000
|
<p><a class="source-toggle" href="#"
|
987
|
-
onclick="toggleCode('
|
988
|
-
<div class="method-source-code" id="
|
1001
|
+
onclick="toggleCode('M000037-source');return false;">[Source]</a></p>
|
1002
|
+
<div class="method-source-code" id="M000037-source">
|
989
1003
|
<pre>
|
990
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
1004
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 157</span>
|
991
1005
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ls_tree</span>(<span class="ruby-identifier">sha</span>)
|
992
1006
|
<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> {}}
|
993
1007
|
<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>
|
@@ -1002,21 +1016,21 @@ READ COMMANDS ##
|
|
1002
1016
|
</div>
|
1003
1017
|
</div>
|
1004
1018
|
|
1005
|
-
<div id="method-
|
1006
|
-
<a name="
|
1019
|
+
<div id="method-M000057" class="method-detail">
|
1020
|
+
<a name="M000057"></a>
|
1007
1021
|
|
1008
1022
|
<div class="method-heading">
|
1009
|
-
<a href="#
|
1023
|
+
<a href="#M000057" class="method-signature">
|
1010
1024
|
<span class="method-name">merge</span><span class="method-args">(branch, message = nil)</span>
|
1011
1025
|
</a>
|
1012
1026
|
</div>
|
1013
1027
|
|
1014
1028
|
<div class="method-description">
|
1015
1029
|
<p><a class="source-toggle" href="#"
|
1016
|
-
onclick="toggleCode('
|
1017
|
-
<div class="method-source-code" id="
|
1030
|
+
onclick="toggleCode('M000057-source');return false;">[Source]</a></p>
|
1031
|
+
<div class="method-source-code" id="M000057-source">
|
1018
1032
|
<pre>
|
1019
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
1033
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 341</span>
|
1020
1034
|
<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>)
|
1021
1035
|
<span class="ruby-identifier">arr_opts</span> = []
|
1022
1036
|
<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>
|
@@ -1028,21 +1042,21 @@ READ COMMANDS ##
|
|
1028
1042
|
</div>
|
1029
1043
|
</div>
|
1030
1044
|
|
1031
|
-
<div id="method-
|
1032
|
-
<a name="
|
1045
|
+
<div id="method-M000031" class="method-detail">
|
1046
|
+
<a name="M000031"></a>
|
1033
1047
|
|
1034
1048
|
<div class="method-heading">
|
1035
|
-
<a href="#
|
1049
|
+
<a href="#M000031" class="method-signature">
|
1036
1050
|
<span class="method-name">namerev</span><span class="method-args">(string)</span>
|
1037
1051
|
</a>
|
1038
1052
|
</div>
|
1039
1053
|
|
1040
1054
|
<div class="method-description">
|
1041
1055
|
<p><a class="source-toggle" href="#"
|
1042
|
-
onclick="toggleCode('
|
1043
|
-
<div class="method-source-code" id="
|
1056
|
+
onclick="toggleCode('M000031-source');return false;">[Source]</a></p>
|
1057
|
+
<div class="method-source-code" id="M000031-source">
|
1044
1058
|
<pre>
|
1045
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
1059
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 91</span>
|
1046
1060
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">namerev</span>(<span class="ruby-identifier">string</span>)
|
1047
1061
|
<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>]
|
1048
1062
|
<span class="ruby-keyword kw">end</span>
|
@@ -1051,21 +1065,21 @@ READ COMMANDS ##
|
|
1051
1065
|
</div>
|
1052
1066
|
</div>
|
1053
1067
|
|
1054
|
-
<div id="method-
|
1055
|
-
<a name="
|
1068
|
+
<div id="method-M000036" class="method-detail">
|
1069
|
+
<a name="M000036"></a>
|
1056
1070
|
|
1057
1071
|
<div class="method-heading">
|
1058
|
-
<a href="#
|
1072
|
+
<a href="#M000036" class="method-signature">
|
1059
1073
|
<span class="method-name">object_contents</span><span class="method-args">(sha)</span>
|
1060
1074
|
</a>
|
1061
1075
|
</div>
|
1062
1076
|
|
1063
1077
|
<div class="method-description">
|
1064
1078
|
<p><a class="source-toggle" href="#"
|
1065
|
-
onclick="toggleCode('
|
1066
|
-
<div class="method-source-code" id="
|
1079
|
+
onclick="toggleCode('M000036-source');return false;">[Source]</a></p>
|
1080
|
+
<div class="method-source-code" id="M000036-source">
|
1067
1081
|
<pre>
|
1068
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
1082
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 153</span>
|
1069
1083
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">object_contents</span>(<span class="ruby-identifier">sha</span>)
|
1070
1084
|
<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>])
|
1071
1085
|
<span class="ruby-keyword kw">end</span>
|
@@ -1074,21 +1088,21 @@ READ COMMANDS ##
|
|
1074
1088
|
</div>
|
1075
1089
|
</div>
|
1076
1090
|
|
1077
|
-
<div id="method-
|
1078
|
-
<a name="
|
1091
|
+
<div id="method-M000033" class="method-detail">
|
1092
|
+
<a name="M000033"></a>
|
1079
1093
|
|
1080
1094
|
<div class="method-heading">
|
1081
|
-
<a href="#
|
1095
|
+
<a href="#M000033" class="method-signature">
|
1082
1096
|
<span class="method-name">object_size</span><span class="method-args">(sha)</span>
|
1083
1097
|
</a>
|
1084
1098
|
</div>
|
1085
1099
|
|
1086
1100
|
<div class="method-description">
|
1087
1101
|
<p><a class="source-toggle" href="#"
|
1088
|
-
onclick="toggleCode('
|
1089
|
-
<div class="method-source-code" id="
|
1102
|
+
onclick="toggleCode('M000033-source');return false;">[Source]</a></p>
|
1103
|
+
<div class="method-source-code" id="M000033-source">
|
1090
1104
|
<pre>
|
1091
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
1105
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 99</span>
|
1092
1106
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">object_size</span>(<span class="ruby-identifier">sha</span>)
|
1093
1107
|
<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>
|
1094
1108
|
<span class="ruby-keyword kw">end</span>
|
@@ -1097,21 +1111,21 @@ READ COMMANDS ##
|
|
1097
1111
|
</div>
|
1098
1112
|
</div>
|
1099
1113
|
|
1100
|
-
<div id="method-
|
1101
|
-
<a name="
|
1114
|
+
<div id="method-M000032" class="method-detail">
|
1115
|
+
<a name="M000032"></a>
|
1102
1116
|
|
1103
1117
|
<div class="method-heading">
|
1104
|
-
<a href="#
|
1118
|
+
<a href="#M000032" class="method-signature">
|
1105
1119
|
<span class="method-name">object_type</span><span class="method-args">(sha)</span>
|
1106
1120
|
</a>
|
1107
1121
|
</div>
|
1108
1122
|
|
1109
1123
|
<div class="method-description">
|
1110
1124
|
<p><a class="source-toggle" href="#"
|
1111
|
-
onclick="toggleCode('
|
1112
|
-
<div class="method-source-code" id="
|
1125
|
+
onclick="toggleCode('M000032-source');return false;">[Source]</a></p>
|
1126
|
+
<div class="method-source-code" id="M000032-source">
|
1113
1127
|
<pre>
|
1114
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
1128
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 95</span>
|
1115
1129
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">object_type</span>(<span class="ruby-identifier">sha</span>)
|
1116
1130
|
<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>])
|
1117
1131
|
<span class="ruby-keyword kw">end</span>
|
@@ -1120,21 +1134,83 @@ READ COMMANDS ##
|
|
1120
1134
|
</div>
|
1121
1135
|
</div>
|
1122
1136
|
|
1123
|
-
<div id="method-
|
1124
|
-
<a name="
|
1137
|
+
<div id="method-M000035" class="method-detail">
|
1138
|
+
<a name="M000035"></a>
|
1125
1139
|
|
1126
1140
|
<div class="method-heading">
|
1127
|
-
<a href="#
|
1141
|
+
<a href="#M000035" class="method-signature">
|
1142
|
+
<span class="method-name">process_commit_data</span><span class="method-args">(data, sha = nil)</span>
|
1143
|
+
</a>
|
1144
|
+
</div>
|
1145
|
+
|
1146
|
+
<div class="method-description">
|
1147
|
+
<p><a class="source-toggle" href="#"
|
1148
|
+
onclick="toggleCode('M000035-source');return false;">[Source]</a></p>
|
1149
|
+
<div class="method-source-code" id="M000035-source">
|
1150
|
+
<pre>
|
1151
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 110</span>
|
1152
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process_commit_data</span>(<span class="ruby-identifier">data</span>, <span class="ruby-identifier">sha</span> = <span class="ruby-keyword kw">nil</span>)
|
1153
|
+
<span class="ruby-identifier">in_message</span> = <span class="ruby-keyword kw">false</span>
|
1154
|
+
|
1155
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">sha</span>
|
1156
|
+
<span class="ruby-identifier">hsh</span> = {<span class="ruby-value str">'sha'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">sha</span>, <span class="ruby-value str">'message'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">''</span>, <span class="ruby-value str">'parent'</span> =<span class="ruby-operator">></span> []}
|
1157
|
+
<span class="ruby-keyword kw">else</span>
|
1158
|
+
<span class="ruby-identifier">hsh_array</span> = []
|
1159
|
+
<span class="ruby-keyword kw">end</span>
|
1160
|
+
|
1161
|
+
<span class="ruby-identifier">data</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>
|
1162
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">in_message</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">line</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">''</span>
|
1163
|
+
<span class="ruby-identifier">hsh</span>[<span class="ruby-value str">'message'</span>] <span class="ruby-operator">+=</span> <span class="ruby-identifier">line</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"\n"</span>
|
1164
|
+
<span class="ruby-keyword kw">end</span>
|
1165
|
+
|
1166
|
+
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">line</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">''</span>) <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-identifier">in_message</span>
|
1167
|
+
<span class="ruby-identifier">data</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">split</span>
|
1168
|
+
<span class="ruby-identifier">key</span> = <span class="ruby-identifier">data</span>.<span class="ruby-identifier">shift</span>
|
1169
|
+
<span class="ruby-identifier">value</span> = <span class="ruby-identifier">data</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>)
|
1170
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">key</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'commit'</span>
|
1171
|
+
<span class="ruby-identifier">sha</span> = <span class="ruby-identifier">value</span>
|
1172
|
+
<span class="ruby-identifier">hsh_array</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">hsh</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hsh</span>
|
1173
|
+
<span class="ruby-identifier">hsh</span> = {<span class="ruby-value str">'sha'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">sha</span>, <span class="ruby-value str">'message'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">''</span>, <span class="ruby-value str">'parent'</span> =<span class="ruby-operator">></span> []}
|
1174
|
+
<span class="ruby-keyword kw">end</span>
|
1175
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">key</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'parent'</span>
|
1176
|
+
<span class="ruby-identifier">hsh</span>[<span class="ruby-identifier">key</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">value</span>
|
1177
|
+
<span class="ruby-keyword kw">else</span>
|
1178
|
+
<span class="ruby-identifier">hsh</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">value</span>
|
1179
|
+
<span class="ruby-keyword kw">end</span>
|
1180
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">in_message</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">line</span> <span class="ruby-operator">==</span> <span class="ruby-value str">''</span>
|
1181
|
+
<span class="ruby-identifier">in_message</span> = <span class="ruby-keyword kw">false</span>
|
1182
|
+
<span class="ruby-keyword kw">else</span>
|
1183
|
+
<span class="ruby-identifier">in_message</span> = <span class="ruby-keyword kw">true</span>
|
1184
|
+
<span class="ruby-keyword kw">end</span>
|
1185
|
+
<span class="ruby-keyword kw">end</span>
|
1186
|
+
|
1187
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hsh_array</span>
|
1188
|
+
<span class="ruby-identifier">hsh_array</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">hsh</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hsh</span>
|
1189
|
+
<span class="ruby-identifier">hsh_array</span>
|
1190
|
+
<span class="ruby-keyword kw">else</span>
|
1191
|
+
<span class="ruby-identifier">hsh</span>
|
1192
|
+
<span class="ruby-keyword kw">end</span>
|
1193
|
+
<span class="ruby-keyword kw">end</span>
|
1194
|
+
</pre>
|
1195
|
+
</div>
|
1196
|
+
</div>
|
1197
|
+
</div>
|
1198
|
+
|
1199
|
+
<div id="method-M000064" class="method-detail">
|
1200
|
+
<a name="M000064"></a>
|
1201
|
+
|
1202
|
+
<div class="method-heading">
|
1203
|
+
<a href="#M000064" class="method-signature">
|
1128
1204
|
<span class="method-name">push</span><span class="method-args">(remote, branch = 'master')</span>
|
1129
1205
|
</a>
|
1130
1206
|
</div>
|
1131
1207
|
|
1132
1208
|
<div class="method-description">
|
1133
1209
|
<p><a class="source-toggle" href="#"
|
1134
|
-
onclick="toggleCode('
|
1135
|
-
<div class="method-source-code" id="
|
1210
|
+
onclick="toggleCode('M000064-source');return false;">[Source]</a></p>
|
1211
|
+
<div class="method-source-code" id="M000064-source">
|
1136
1212
|
<pre>
|
1137
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
1213
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 380</span>
|
1138
1214
|
<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>)
|
1139
1215
|
<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>])
|
1140
1216
|
<span class="ruby-keyword kw">end</span>
|
@@ -1143,11 +1219,11 @@ READ COMMANDS ##
|
|
1143
1219
|
</div>
|
1144
1220
|
</div>
|
1145
1221
|
|
1146
|
-
<div id="method-
|
1147
|
-
<a name="
|
1222
|
+
<div id="method-M000067" class="method-detail">
|
1223
|
+
<a name="M000067"></a>
|
1148
1224
|
|
1149
1225
|
<div class="method-heading">
|
1150
|
-
<a href="#
|
1226
|
+
<a href="#M000067" class="method-signature">
|
1151
1227
|
<span class="method-name">read_tree</span><span class="method-args">(treeish, opts = {})</span>
|
1152
1228
|
</a>
|
1153
1229
|
</div>
|
@@ -1157,10 +1233,10 @@ READ COMMANDS ##
|
|
1157
1233
|
reads a tree into the current index file
|
1158
1234
|
</p>
|
1159
1235
|
<p><a class="source-toggle" href="#"
|
1160
|
-
onclick="toggleCode('
|
1161
|
-
<div class="method-source-code" id="
|
1236
|
+
onclick="toggleCode('M000067-source');return false;">[Source]</a></p>
|
1237
|
+
<div class="method-source-code" id="M000067-source">
|
1162
1238
|
<pre>
|
1163
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
1239
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 393</span>
|
1164
1240
|
<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> = {})
|
1165
1241
|
<span class="ruby-identifier">arr_opts</span> = []
|
1166
1242
|
<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>]
|
@@ -1172,21 +1248,21 @@ reads a tree into the current index file
|
|
1172
1248
|
</div>
|
1173
1249
|
</div>
|
1174
1250
|
|
1175
|
-
<div id="method-
|
1176
|
-
<a name="
|
1251
|
+
<div id="method-M000058" class="method-detail">
|
1252
|
+
<a name="M000058"></a>
|
1177
1253
|
|
1178
1254
|
<div class="method-heading">
|
1179
|
-
<a href="#
|
1255
|
+
<a href="#M000058" class="method-signature">
|
1180
1256
|
<span class="method-name">remote_add</span><span class="method-args">(name, url, opts = {})</span>
|
1181
1257
|
</a>
|
1182
1258
|
</div>
|
1183
1259
|
|
1184
1260
|
<div class="method-description">
|
1185
1261
|
<p><a class="source-toggle" href="#"
|
1186
|
-
onclick="toggleCode('
|
1187
|
-
<div class="method-source-code" id="
|
1262
|
+
onclick="toggleCode('M000058-source');return false;">[Source]</a></p>
|
1263
|
+
<div class="method-source-code" id="M000058-source">
|
1188
1264
|
<pre>
|
1189
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
1265
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 348</span>
|
1190
1266
|
<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> = {})
|
1191
1267
|
<span class="ruby-identifier">arr_opts</span> = [<span class="ruby-value str">'add'</span>]
|
1192
1268
|
<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>]
|
@@ -1200,11 +1276,11 @@ reads a tree into the current index file
|
|
1200
1276
|
</div>
|
1201
1277
|
</div>
|
1202
1278
|
|
1203
|
-
<div id="method-
|
1204
|
-
<a name="
|
1279
|
+
<div id="method-M000059" class="method-detail">
|
1280
|
+
<a name="M000059"></a>
|
1205
1281
|
|
1206
1282
|
<div class="method-heading">
|
1207
|
-
<a href="#
|
1283
|
+
<a href="#M000059" class="method-signature">
|
1208
1284
|
<span class="method-name">remote_remove</span><span class="method-args">(name)</span>
|
1209
1285
|
</a>
|
1210
1286
|
</div>
|
@@ -1215,10 +1291,10 @@ this is documented as such, but seems broken for some reason i’ll try
|
|
1215
1291
|
to get around it some other way later
|
1216
1292
|
</p>
|
1217
1293
|
<p><a class="source-toggle" href="#"
|
1218
|
-
onclick="toggleCode('
|
1219
|
-
<div class="method-source-code" id="
|
1294
|
+
onclick="toggleCode('M000059-source');return false;">[Source]</a></p>
|
1295
|
+
<div class="method-source-code" id="M000059-source">
|
1220
1296
|
<pre>
|
1221
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
1297
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 359</span>
|
1222
1298
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remote_remove</span>(<span class="ruby-identifier">name</span>)
|
1223
1299
|
<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>])
|
1224
1300
|
<span class="ruby-keyword kw">end</span>
|
@@ -1227,21 +1303,21 @@ to get around it some other way later
|
|
1227
1303
|
</div>
|
1228
1304
|
</div>
|
1229
1305
|
|
1230
|
-
<div id="method-
|
1231
|
-
<a name="
|
1306
|
+
<div id="method-M000060" class="method-detail">
|
1307
|
+
<a name="M000060"></a>
|
1232
1308
|
|
1233
1309
|
<div class="method-heading">
|
1234
|
-
<a href="#
|
1310
|
+
<a href="#M000060" class="method-signature">
|
1235
1311
|
<span class="method-name">remotes</span><span class="method-args">()</span>
|
1236
1312
|
</a>
|
1237
1313
|
</div>
|
1238
1314
|
|
1239
1315
|
<div class="method-description">
|
1240
1316
|
<p><a class="source-toggle" href="#"
|
1241
|
-
onclick="toggleCode('
|
1242
|
-
<div class="method-source-code" id="
|
1317
|
+
onclick="toggleCode('M000060-source');return false;">[Source]</a></p>
|
1318
|
+
<div class="method-source-code" id="M000060-source">
|
1243
1319
|
<pre>
|
1244
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
1320
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 363</span>
|
1245
1321
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remotes</span>
|
1246
1322
|
<span class="ruby-identifier">command_lines</span>(<span class="ruby-value str">'remote'</span>)
|
1247
1323
|
<span class="ruby-keyword kw">end</span>
|
@@ -1250,21 +1326,21 @@ to get around it some other way later
|
|
1250
1326
|
</div>
|
1251
1327
|
</div>
|
1252
1328
|
|
1253
|
-
<div id="method-
|
1254
|
-
<a name="
|
1329
|
+
<div id="method-M000051" class="method-detail">
|
1330
|
+
<a name="M000051"></a>
|
1255
1331
|
|
1256
1332
|
<div class="method-heading">
|
1257
|
-
<a href="#
|
1333
|
+
<a href="#M000051" class="method-signature">
|
1258
1334
|
<span class="method-name">remove</span><span class="method-args">(path = '.', opts = {})</span>
|
1259
1335
|
</a>
|
1260
1336
|
</div>
|
1261
1337
|
|
1262
1338
|
<div class="method-description">
|
1263
1339
|
<p><a class="source-toggle" href="#"
|
1264
|
-
onclick="toggleCode('
|
1265
|
-
<div class="method-source-code" id="
|
1340
|
+
onclick="toggleCode('M000051-source');return false;">[Source]</a></p>
|
1341
|
+
<div class="method-source-code" id="M000051-source">
|
1266
1342
|
<pre>
|
1267
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
1343
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 301</span>
|
1268
1344
|
<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> = {})
|
1269
1345
|
<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>)
|
1270
1346
|
|
@@ -1279,21 +1355,21 @@ to get around it some other way later
|
|
1279
1355
|
</div>
|
1280
1356
|
</div>
|
1281
1357
|
|
1282
|
-
<div id="method-
|
1283
|
-
<a name="
|
1358
|
+
<div id="method-M000066" class="method-detail">
|
1359
|
+
<a name="M000066"></a>
|
1284
1360
|
|
1285
1361
|
<div class="method-heading">
|
1286
|
-
<a href="#
|
1362
|
+
<a href="#M000066" class="method-signature">
|
1287
1363
|
<span class="method-name">repack</span><span class="method-args">()</span>
|
1288
1364
|
</a>
|
1289
1365
|
</div>
|
1290
1366
|
|
1291
1367
|
<div class="method-description">
|
1292
1368
|
<p><a class="source-toggle" href="#"
|
1293
|
-
onclick="toggleCode('
|
1294
|
-
<div class="method-source-code" id="
|
1369
|
+
onclick="toggleCode('M000066-source');return false;">[Source]</a></p>
|
1370
|
+
<div class="method-source-code" id="M000066-source">
|
1295
1371
|
<pre>
|
1296
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
1372
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 388</span>
|
1297
1373
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">repack</span>
|
1298
1374
|
<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>])
|
1299
1375
|
<span class="ruby-keyword kw">end</span>
|
@@ -1302,21 +1378,21 @@ to get around it some other way later
|
|
1302
1378
|
</div>
|
1303
1379
|
</div>
|
1304
1380
|
|
1305
|
-
<div id="method-
|
1306
|
-
<a name="
|
1381
|
+
<div id="method-M000053" class="method-detail">
|
1382
|
+
<a name="M000053"></a>
|
1307
1383
|
|
1308
1384
|
<div class="method-heading">
|
1309
|
-
<a href="#
|
1385
|
+
<a href="#M000053" class="method-signature">
|
1310
1386
|
<span class="method-name">reset</span><span class="method-args">(commit, opts = {})</span>
|
1311
1387
|
</a>
|
1312
1388
|
</div>
|
1313
1389
|
|
1314
1390
|
<div class="method-description">
|
1315
1391
|
<p><a class="source-toggle" href="#"
|
1316
|
-
onclick="toggleCode('
|
1317
|
-
<div class="method-source-code" id="
|
1392
|
+
onclick="toggleCode('M000053-source');return false;">[Source]</a></p>
|
1393
|
+
<div class="method-source-code" id="M000053-source">
|
1318
1394
|
<pre>
|
1319
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
1395
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 317</span>
|
1320
1396
|
<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> = {})
|
1321
1397
|
<span class="ruby-identifier">arr_opts</span> = []
|
1322
1398
|
<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>]
|
@@ -1328,22 +1404,25 @@ to get around it some other way later
|
|
1328
1404
|
</div>
|
1329
1405
|
</div>
|
1330
1406
|
|
1331
|
-
<div id="method-
|
1332
|
-
<a name="
|
1407
|
+
<div id="method-M000030" class="method-detail">
|
1408
|
+
<a name="M000030"></a>
|
1333
1409
|
|
1334
1410
|
<div class="method-heading">
|
1335
|
-
<a href="#
|
1411
|
+
<a href="#M000030" class="method-signature">
|
1336
1412
|
<span class="method-name">revparse</span><span class="method-args">(string)</span>
|
1337
1413
|
</a>
|
1338
1414
|
</div>
|
1339
1415
|
|
1340
1416
|
<div class="method-description">
|
1341
1417
|
<p><a class="source-toggle" href="#"
|
1342
|
-
onclick="toggleCode('
|
1343
|
-
<div class="method-source-code" id="
|
1418
|
+
onclick="toggleCode('M000030-source');return false;">[Source]</a></p>
|
1419
|
+
<div class="method-source-code" id="M000030-source">
|
1344
1420
|
<pre>
|
1345
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
1421
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 84</span>
|
1346
1422
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">revparse</span>(<span class="ruby-identifier">string</span>)
|
1423
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-regexp re">/\w{40}/</span>.<span class="ruby-identifier">match</span>(<span class="ruby-identifier">string</span>) <span class="ruby-comment cmt"># passing in a sha - just no-op it</span>
|
1424
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">string</span>
|
1425
|
+
<span class="ruby-keyword kw">end</span>
|
1347
1426
|
<span class="ruby-identifier">command</span>(<span class="ruby-value str">'rev-parse'</span>, <span class="ruby-identifier">string</span>)
|
1348
1427
|
<span class="ruby-keyword kw">end</span>
|
1349
1428
|
</pre>
|
@@ -1351,21 +1430,21 @@ to get around it some other way later
|
|
1351
1430
|
</div>
|
1352
1431
|
</div>
|
1353
1432
|
|
1354
|
-
<div id="method-
|
1355
|
-
<a name="
|
1433
|
+
<div id="method-M000062" class="method-detail">
|
1434
|
+
<a name="M000062"></a>
|
1356
1435
|
|
1357
1436
|
<div class="method-heading">
|
1358
|
-
<a href="#
|
1437
|
+
<a href="#M000062" class="method-signature">
|
1359
1438
|
<span class="method-name">tag</span><span class="method-args">(tag)</span>
|
1360
1439
|
</a>
|
1361
1440
|
</div>
|
1362
1441
|
|
1363
1442
|
<div class="method-description">
|
1364
1443
|
<p><a class="source-toggle" href="#"
|
1365
|
-
onclick="toggleCode('
|
1366
|
-
<div class="method-source-code" id="
|
1444
|
+
onclick="toggleCode('M000062-source');return false;">[Source]</a></p>
|
1445
|
+
<div class="method-source-code" id="M000062-source">
|
1367
1446
|
<pre>
|
1368
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
1447
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 371</span>
|
1369
1448
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tag</span>(<span class="ruby-identifier">tag</span>)
|
1370
1449
|
<span class="ruby-identifier">command</span>(<span class="ruby-value str">'tag'</span>, <span class="ruby-identifier">tag</span>)
|
1371
1450
|
<span class="ruby-keyword kw">end</span>
|
@@ -1374,21 +1453,21 @@ to get around it some other way later
|
|
1374
1453
|
</div>
|
1375
1454
|
</div>
|
1376
1455
|
|
1377
|
-
<div id="method-
|
1378
|
-
<a name="
|
1456
|
+
<div id="method-M000065" class="method-detail">
|
1457
|
+
<a name="M000065"></a>
|
1379
1458
|
|
1380
1459
|
<div class="method-heading">
|
1381
|
-
<a href="#
|
1460
|
+
<a href="#M000065" class="method-signature">
|
1382
1461
|
<span class="method-name">tag_sha</span><span class="method-args">(tag_name)</span>
|
1383
1462
|
</a>
|
1384
1463
|
</div>
|
1385
1464
|
|
1386
1465
|
<div class="method-description">
|
1387
1466
|
<p><a class="source-toggle" href="#"
|
1388
|
-
onclick="toggleCode('
|
1389
|
-
<div class="method-source-code" id="
|
1467
|
+
onclick="toggleCode('M000065-source');return false;">[Source]</a></p>
|
1468
|
+
<div class="method-source-code" id="M000065-source">
|
1390
1469
|
<pre>
|
1391
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
1470
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 384</span>
|
1392
1471
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tag_sha</span>(<span class="ruby-identifier">tag_name</span>)
|
1393
1472
|
<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>])
|
1394
1473
|
<span class="ruby-keyword kw">end</span>
|
@@ -1397,21 +1476,21 @@ to get around it some other way later
|
|
1397
1476
|
</div>
|
1398
1477
|
</div>
|
1399
1478
|
|
1400
|
-
<div id="method-
|
1401
|
-
<a name="
|
1479
|
+
<div id="method-M000061" class="method-detail">
|
1480
|
+
<a name="M000061"></a>
|
1402
1481
|
|
1403
1482
|
<div class="method-heading">
|
1404
|
-
<a href="#
|
1483
|
+
<a href="#M000061" class="method-signature">
|
1405
1484
|
<span class="method-name">tags</span><span class="method-args">()</span>
|
1406
1485
|
</a>
|
1407
1486
|
</div>
|
1408
1487
|
|
1409
1488
|
<div class="method-description">
|
1410
1489
|
<p><a class="source-toggle" href="#"
|
1411
|
-
onclick="toggleCode('
|
1412
|
-
<div class="method-source-code" id="
|
1490
|
+
onclick="toggleCode('M000061-source');return false;">[Source]</a></p>
|
1491
|
+
<div class="method-source-code" id="M000061-source">
|
1413
1492
|
<pre>
|
1414
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
1493
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 367</span>
|
1415
1494
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tags</span>
|
1416
1495
|
<span class="ruby-identifier">command_lines</span>(<span class="ruby-value str">'tag'</span>)
|
1417
1496
|
<span class="ruby-keyword kw">end</span>
|
@@ -1420,21 +1499,21 @@ to get around it some other way later
|
|
1420
1499
|
</div>
|
1421
1500
|
</div>
|
1422
1501
|
|
1423
|
-
<div id="method-
|
1424
|
-
<a name="
|
1502
|
+
<div id="method-M000070" class="method-detail">
|
1503
|
+
<a name="M000070"></a>
|
1425
1504
|
|
1426
1505
|
<div class="method-heading">
|
1427
|
-
<a href="#
|
1506
|
+
<a href="#M000070" class="method-signature">
|
1428
1507
|
<span class="method-name">update_ref</span><span class="method-args">(branch, commit)</span>
|
1429
1508
|
</a>
|
1430
1509
|
</div>
|
1431
1510
|
|
1432
1511
|
<div class="method-description">
|
1433
1512
|
<p><a class="source-toggle" href="#"
|
1434
|
-
onclick="toggleCode('
|
1435
|
-
<div class="method-source-code" id="
|
1513
|
+
onclick="toggleCode('M000070-source');return false;">[Source]</a></p>
|
1514
|
+
<div class="method-source-code" id="M000070-source">
|
1436
1515
|
<pre>
|
1437
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
1516
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 418</span>
|
1438
1517
|
<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>)
|
1439
1518
|
<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>])
|
1440
1519
|
<span class="ruby-keyword kw">end</span>
|
@@ -1443,21 +1522,21 @@ to get around it some other way later
|
|
1443
1522
|
</div>
|
1444
1523
|
</div>
|
1445
1524
|
|
1446
|
-
<div id="method-
|
1447
|
-
<a name="
|
1525
|
+
<div id="method-M000068" class="method-detail">
|
1526
|
+
<a name="M000068"></a>
|
1448
1527
|
|
1449
1528
|
<div class="method-heading">
|
1450
|
-
<a href="#
|
1529
|
+
<a href="#M000068" class="method-signature">
|
1451
1530
|
<span class="method-name">write_tree</span><span class="method-args">()</span>
|
1452
1531
|
</a>
|
1453
1532
|
</div>
|
1454
1533
|
|
1455
1534
|
<div class="method-description">
|
1456
1535
|
<p><a class="source-toggle" href="#"
|
1457
|
-
onclick="toggleCode('
|
1458
|
-
<div class="method-source-code" id="
|
1536
|
+
onclick="toggleCode('M000068-source');return false;">[Source]</a></p>
|
1537
|
+
<div class="method-source-code" id="M000068-source">
|
1459
1538
|
<pre>
|
1460
|
-
<span class="ruby-comment cmt"># File lib/git/lib.rb, line
|
1539
|
+
<span class="ruby-comment cmt"># File lib/git/lib.rb, line 400</span>
|
1461
1540
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write_tree</span>
|
1462
1541
|
<span class="ruby-identifier">command</span>(<span class="ruby-value str">'write-tree'</span>)
|
1463
1542
|
<span class="ruby-keyword kw">end</span>
|