gitlab_git 3.0.0.pre → 3.0.0.rc1
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.
- checksums.yaml +4 -4
- data/lib/gitlab_git/git_stats.rb +1 -1
- data/lib/gitlab_git/tree.rb +4 -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: 061266e7234962fd43fe48eb18710ded69e88afa
|
4
|
+
data.tar.gz: 3468b7e333ff3c026ab8714db5fb1c050e764801
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97d410af783e7eb7d7dde5a9e9c408e73aa73939c191d1a80dceecb34c5547a15eca32671d87c6a8846e09c8b5cb6a6760218b5eb49b81849cce38911df063f1
|
7
|
+
data.tar.gz: f0b9e7ec3ea4ed24c010ef96d8ec6b8227efc8fbe3560c2d3bb52d93cf3d3ede5c5ad77a2ed332d989d3b38033e955485c17f118b912655e7bd905c9151082a9
|
data/lib/gitlab_git/git_stats.rb
CHANGED
@@ -13,7 +13,7 @@ module Gitlab
|
|
13
13
|
log = nil
|
14
14
|
Grit::Git.with_timeout(30) do
|
15
15
|
# Limit log to 6k commits to avoid timeout for huge projects
|
16
|
-
args = ['-6000', '--format=%aN%x0a%aE%x0a%cd', '--date=short', '--shortstat', '--no-merges', '--diff-filter=ACDM']
|
16
|
+
args = [ref, '-6000', '--format=%aN%x0a%aE%x0a%cd', '--date=short', '--shortstat', '--no-merges', '--diff-filter=ACDM']
|
17
17
|
log = repo.git.run(nil, 'log', nil, {}, args)
|
18
18
|
end
|
19
19
|
|
data/lib/gitlab_git/tree.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
module Gitlab
|
2
2
|
module Git
|
3
3
|
class Tree
|
4
|
-
attr_accessor :id, :name, :path, :type, :mode, :commit_id
|
4
|
+
attr_accessor :id, :name, :path, :type, :mode, :commit_id, :submodule_url
|
5
5
|
|
6
6
|
class << self
|
7
7
|
def where(repository, sha, path = '/')
|
8
8
|
commit = Commit.find(repository, sha)
|
9
9
|
grit_tree = commit.tree / path
|
10
10
|
|
11
|
-
if grit_tree
|
11
|
+
if grit_tree && grit_tree.respond_to?(:contents)
|
12
12
|
grit_tree.contents.map do |entry|
|
13
13
|
type = entry.class.to_s.split("::").last.downcase.to_sym
|
14
14
|
|
@@ -19,6 +19,7 @@ module Gitlab
|
|
19
19
|
mode: entry.mode,
|
20
20
|
path: path == '/' ? entry.name : File.join(path, entry.name),
|
21
21
|
commit_id: sha,
|
22
|
+
submodule_url: (type == :submodule) ? entry.url(sha) : nil
|
22
23
|
)
|
23
24
|
end
|
24
25
|
else
|
@@ -28,7 +29,7 @@ module Gitlab
|
|
28
29
|
end
|
29
30
|
|
30
31
|
def initialize(options)
|
31
|
-
%w(id name path type mode commit_id).each do |key|
|
32
|
+
%w(id name path type mode commit_id submodule_url).each do |key|
|
32
33
|
self.send("#{key}=", options[key.to_sym])
|
33
34
|
end
|
34
35
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab_git
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0.
|
4
|
+
version: 3.0.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitriy Zaporozhets
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: github-linguist
|