blackwinter-git 1.2.5 → 1.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/git/base.rb +4 -0
- data/lib/git/lib.rb +10 -3
- metadata +4 -4
data/lib/git/base.rb
CHANGED
data/lib/git/lib.rb
CHANGED
@@ -237,13 +237,16 @@ module Git
|
|
237
237
|
grep_opts = ['-n']
|
238
238
|
grep_opts << '-i' if opts[:ignore_case]
|
239
239
|
grep_opts << '-v' if opts[:invert_match]
|
240
|
-
grep_opts << '-
|
241
|
-
grep_opts << string
|
240
|
+
grep_opts << '-l' if opts[:name_only]
|
241
|
+
grep_opts << '-e' << string
|
242
242
|
grep_opts << opts[:object] if opts[:object].is_a?(String)
|
243
243
|
grep_opts << '--' << opts[:path_limiter] if opts[:path_limiter].is_a? String
|
244
244
|
|
245
|
+
matches = command_lines('grep', grep_opts)
|
246
|
+
return matches if opts[:name_only]
|
247
|
+
|
245
248
|
hsh = {}
|
246
|
-
|
249
|
+
matches.each do |line|
|
247
250
|
if m = /(.*)\:(\d+)\:(.*)/.match(line)
|
248
251
|
hsh[m[1]] ||= []
|
249
252
|
hsh[m[1]] << [m[2].to_i, m[3]]
|
@@ -581,6 +584,10 @@ module Git
|
|
581
584
|
def fetch(remote)
|
582
585
|
command('fetch', remote)
|
583
586
|
end
|
587
|
+
|
588
|
+
def pull(remote, branch = 'master')
|
589
|
+
command('pull', [remote, branch])
|
590
|
+
end
|
584
591
|
|
585
592
|
def push(remote, branch = 'master', tags = false)
|
586
593
|
command('push', [remote, branch])
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blackwinter-git
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 1.2.
|
9
|
+
- 6
|
10
|
+
version: 1.2.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Scott Chacon
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-07-
|
19
|
+
date: 2010-07-23 00:00:00 +02:00
|
20
20
|
default_executable:
|
21
21
|
dependencies: []
|
22
22
|
|