gitlab-grit 2.6.9 → 2.6.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/VERSION +1 -1
- data/lib/grit/git.rb +3 -4
- data/lib/grit/repo.rb +1 -1
- data/lib/grit/status.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc0703262bb7ef4d6c8b89f043540bca37883db1
|
4
|
+
data.tar.gz: 3dbb330aa2501a0e99adcb6a3ceec5b24434f8f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6bbe550adc711e01b2bbd0ae76d99f6de7647fcbad4614bf817fe9c48035ea32d881abae7751d77f3815e8672b6727898e0041b3821805b6501d0dd84193d31
|
7
|
+
data.tar.gz: 32bb2bf904b9948b38e2a8feaee05fc03d5f99904e43d738f0d43f696ae331ffe0b38cb3c173fa83b87abf1377e6094d4ac31ebcc12abc5a3d7a319f1ba1e8b3
|
data/README.md
CHANGED
@@ -21,6 +21,8 @@ We patched existing grit library to use it inside GitLab
|
|
21
21
|
* Fixes symlinks omission from diff
|
22
22
|
* Added Gemfile
|
23
23
|
* Ruby 2.0 support
|
24
|
+
* Automatically set the `--work-tree=` option for Git
|
25
|
+
* Remove `chdir:` option from Grit::Git#native
|
24
26
|
* and much more small fixes
|
25
27
|
|
26
28
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.6.
|
1
|
+
2.6.10
|
data/lib/grit/git.rb
CHANGED
@@ -93,9 +93,9 @@ module Grit
|
|
93
93
|
|
94
94
|
attr_accessor :git_dir, :bytes_read, :work_tree
|
95
95
|
|
96
|
-
def initialize(git_dir)
|
96
|
+
def initialize(git_dir, options={})
|
97
97
|
self.git_dir = git_dir
|
98
|
-
self.work_tree =
|
98
|
+
self.work_tree = options[:work_tree]
|
99
99
|
self.bytes_read = 0
|
100
100
|
end
|
101
101
|
|
@@ -320,12 +320,12 @@ module Grit
|
|
320
320
|
input = options.delete(:input)
|
321
321
|
timeout = options.delete(:timeout); timeout = true if timeout.nil?
|
322
322
|
base = options.delete(:base); base = true if base.nil?
|
323
|
-
chdir = options.delete(:chdir)
|
324
323
|
|
325
324
|
# build up the git process argv
|
326
325
|
argv = []
|
327
326
|
argv << Git.git_binary
|
328
327
|
argv << "--git-dir=#{git_dir}" if base
|
328
|
+
argv << "--work-tree=#{work_tree}" if work_tree
|
329
329
|
argv << cmd.to_s.tr('_', '-')
|
330
330
|
argv.concat(options_to_argv(options))
|
331
331
|
argv.concat(args)
|
@@ -336,7 +336,6 @@ module Grit
|
|
336
336
|
process =
|
337
337
|
Child.new(env, *(argv + [{
|
338
338
|
:input => input,
|
339
|
-
:chdir => chdir,
|
340
339
|
:timeout => (Grit::Git.git_timeout if timeout == true),
|
341
340
|
:max => (Grit::Git.git_max_size if timeout == true)
|
342
341
|
}]))
|
data/lib/grit/repo.rb
CHANGED
data/lib/grit/status.rb
CHANGED
@@ -116,7 +116,7 @@ module Grit
|
|
116
116
|
# compares the index and the working directory
|
117
117
|
def diff_files
|
118
118
|
hsh = {}
|
119
|
-
@base.git.diff_files(
|
119
|
+
@base.git.diff_files({}).split("\n").each do |line|
|
120
120
|
(info, file) = line.split("\t")
|
121
121
|
(mode_src, mode_dest, sha_src, sha_dest, type) = info.split
|
122
122
|
hsh[file] = {:path => file, :mode_file => mode_src.to_s[1, 7], :mode_index => mode_dest,
|
@@ -128,7 +128,7 @@ module Grit
|
|
128
128
|
# compares the index and the repository
|
129
129
|
def diff_index(treeish)
|
130
130
|
hsh = {}
|
131
|
-
@base.git.diff_index({
|
131
|
+
@base.git.diff_index({}, treeish).split("\n").each do |line|
|
132
132
|
(info, file) = line.split("\t")
|
133
133
|
(mode_src, mode_dest, sha_src, sha_dest, type) = info.split
|
134
134
|
hsh[file] = {:path => file, :mode_repo => mode_src.to_s[1, 7], :mode_index => mode_dest,
|
@@ -139,7 +139,7 @@ module Grit
|
|
139
139
|
|
140
140
|
def ls_files
|
141
141
|
hsh = {}
|
142
|
-
lines = @base.git.ls_files({
|
142
|
+
lines = @base.git.ls_files({:stage => true})
|
143
143
|
lines.split("\n").each do |line|
|
144
144
|
(info, file) = line.split("\t")
|
145
145
|
(mode, sha, stage) = info.split
|
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.
|
4
|
+
version: 2.6.10
|
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: 2014-
|
13
|
+
date: 2014-07-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: charlock_holmes
|