gitlab-grit 2.6.0 → 2.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 290c31e6fb93fe5e1dd3c3f81e4f1a2438f00767
4
- data.tar.gz: fda00dfa647aacbc021a1d2800750490a823ff27
3
+ metadata.gz: af275c881c0a7a0f9b5bd97093b3817ed9208a7b
4
+ data.tar.gz: a8a61cbffd8d271e4dcb03e5ba096aad81620c77
5
5
  SHA512:
6
- metadata.gz: 9fa89384e27c8bbbb6eac83b7062f4151be9009f852b4c2434ee2429f24ee21130694355e22662a41c9870602e91700bbccb6ac309da49bd73b66ab427fe8cad
7
- data.tar.gz: bf0e2678fbe8c41dcbacd7a581b4e4f84132a58bb503111cf583c54400f2028fe99f2563b18a9fd03447d8bddb84e3ec796a63926eee742d0b6992f5aeee5715
6
+ metadata.gz: 20070e9bea6fb2278b24b48574f12a6101363feadef525eb80058a57700753f0108b8db66849ca8fbd1b5484581758174595a2138f6a13cb347f53b02d00ce55
7
+ data.tar.gz: 65ff74cd753406728149809b196ff2fe2e281d4539f7c533d1054e5aa43098b6c3373a80055bee588e3ad918bda2642b9bf3165b7a05818f46a9384c0d106933
data/LICENSE CHANGED
@@ -19,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
19
  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
20
  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
21
  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/lib/grit.rb CHANGED
@@ -50,7 +50,7 @@ require 'grit/merge'
50
50
  require 'grit/grep'
51
51
 
52
52
  module Grit
53
- VERSION = '2.6.0'
53
+ VERSION = File.read("VERSION").strip
54
54
 
55
55
  class << self
56
56
  # Set +debug+ to true to log all git calls and responses
data/lib/grit/git.rb CHANGED
@@ -315,10 +315,13 @@ module Grit
315
315
  env = options.delete(:env) || {}
316
316
  raise_errors = options.delete(:raise)
317
317
  process_info = options.delete(:process_info)
318
+ pipeline = options.delete(:pipeline)
318
319
 
319
320
  # fall back to using a shell when the last argument looks like it wants to
320
321
  # start a pipeline for compatibility with previous versions of grit.
321
- return run(prefix, cmd, '', options, args) if args[-1].to_s[0] == ?|
322
+ if args[-1].to_s[0] == ?| && pipeline
323
+ return run(prefix, cmd, '', options, args)
324
+ end
322
325
 
323
326
  # more options
324
327
  input = options.delete(:input)
@@ -414,7 +417,10 @@ module Grit
414
417
  end
415
418
 
416
419
  # DEPRECATED OPEN3-BASED COMMAND EXECUTION
417
-
420
+ # Used only for pipeline support.
421
+ # Ex.
422
+ # git log | grep bugfix
423
+ #
418
424
  def run(prefix, cmd, postfix, options, args, &block)
419
425
  timeout = options.delete(:timeout) rescue nil
420
426
  timeout = true if timeout.nil?
data/lib/grit/repo.rb CHANGED
@@ -1,5 +1,4 @@
1
1
  module Grit
2
-
3
2
  class Repo
4
3
  DAEMON_EXPORT_FILE = 'git-daemon-export-ok'
5
4
  BATCH_PARSERS = {
@@ -621,6 +620,7 @@ module Grit
621
620
  def archive_tar_gz(treeish = 'master', prefix = nil)
622
621
  options = {}
623
622
  options[:prefix] = prefix if prefix
623
+ options[:pipeline] = true
624
624
  self.git.archive(options, treeish, "| gzip -n")
625
625
  end
626
626
 
@@ -636,6 +636,7 @@ module Grit
636
636
  options = {}
637
637
  options[:prefix] = prefix if prefix
638
638
  options[:format] = format if format
639
+ options[:pipeline] = true
639
640
  self.git.archive(options, treeish, "| #{pipe} > #{filename}")
640
641
  end
641
642
 
@@ -715,7 +716,7 @@ module Grit
715
716
 
716
717
  def grep(searchtext, contextlines = 3, branch = 'master')
717
718
  context_arg = '-C ' + contextlines.to_s
718
- result = git.native(:grep, {}, '-n', '-E', '-i', '-z', '--heading', '--break', context_arg, searchtext, branch).encode('UTF-8', invalid: :replace, undef: :replace, replace: '')
719
+ result = git.native(:grep, {pipeline: false}, '-n', '-E', '-i', '-z', '--heading', '--break', context_arg, searchtext, branch).encode('UTF-8', invalid: :replace, undef: :replace, replace: '')
719
720
  greps = []
720
721
  filematches = result.split("\n\n")
721
722
  filematches.each do |filematch|
@@ -756,5 +757,4 @@ module Grit
756
757
  %Q{#<Grit::Repo "#{@path}">}
757
758
  end
758
759
  end # Repo
759
-
760
760
  end # Grit
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-grit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
4
+ version: 2.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Preston-Werner
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-05-06 00:00:00.000000000 Z
13
+ date: 2013-10-31 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: charlock_holmes