gitlab_git 3.0.0.pre → 3.0.0.rc1

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: 2622f3465781a19f3324acd9686bc8be97f08049
4
- data.tar.gz: 1e5b1dd26dac67e8bb1f79389dde036478eecef5
3
+ metadata.gz: 061266e7234962fd43fe48eb18710ded69e88afa
4
+ data.tar.gz: 3468b7e333ff3c026ab8714db5fb1c050e764801
5
5
  SHA512:
6
- metadata.gz: 888f4731e9d7f93a324e77bc3f437123505fbeb59f08bfe8ecc3fc66ea74450d49367a1ae085e53a88bdaeeb19c0f02ac289818ade4d85f955f3d3f8e0d6acf7
7
- data.tar.gz: fe1ce220933080b8fc1a32aa97225af71ef0be1f8036b52a49cfa6786e70ff35183d72d36815d3e54d2c8896b82fd7d312dcf80b921348329ad20d34a1730993
6
+ metadata.gz: 97d410af783e7eb7d7dde5a9e9c408e73aa73939c191d1a80dceecb34c5547a15eca32671d87c6a8846e09c8b5cb6a6760218b5eb49b81849cce38911df063f1
7
+ data.tar.gz: f0b9e7ec3ea4ed24c010ef96d8ec6b8227efc8fbe3560c2d3bb52d93cf3d3ede5c5ad77a2ed332d989d3b38033e955485c17f118b912655e7bd905c9151082a9
@@ -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
 
@@ -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.pre
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-01 00:00:00.000000000 Z
11
+ date: 2013-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github-linguist