gitlab_git 7.0.0.rc9 → 7.0.0.rc10

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/gitlab_git/repository.rb +11 -11
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a7ec22b2587950203d9032f5751289974e071e31
4
- data.tar.gz: fe553f891594bbb3003feb752bebdb6217b28539
3
+ metadata.gz: 47fb0500cc9f11693684d6b9f27574948da9ef92
4
+ data.tar.gz: 19dffe313f146a53f799ab8c6de3ce5a1cbed734
5
5
  SHA512:
6
- metadata.gz: a0f637cfdea87897513107b35aa5166533d6e901ee2b3f8cd27aec7328aa1c4b9d68056ff89e0540aafca89d0d6799042cd9cf26674f71f421f58d49647234fe
7
- data.tar.gz: 22b05d255f9d5be02aeb6197e04fe1f9e2243fa2c58120ad4bbac5de39f079731c2980716bb0a16d34a1ac81fbac8ef22ee83fbc80a4e6d2489d2b4a86dba46e
6
+ metadata.gz: 77646b0c9cc5b1d6f4d218928c9ef143b0caae0eef394c17fe893f032f986efaebc0639c3d94ee9c4faeb39a5fa627b7a10f0db161ccfba2cda658a88bd1ed4b
7
+ data.tar.gz: fc6fccda0442a3acb885d92d6b924e4f5344bee8cac725c048541d0f296f9acb03f2bfdd04ec26529e4c72f96519b8b31b4ac90842b12b1fbfcda6d63a674331
data/VERSION CHANGED
@@ -1 +1 @@
1
- 7.0.0.rc9
1
+ 7.0.0.rc10
@@ -412,10 +412,10 @@ module Gitlab
412
412
  # }
413
413
  #
414
414
  def submodules(ref)
415
- tree = rugged.lookup(rugged.rev_parse_oid(ref)).tree
415
+ commit = rugged.rev_parse(ref)
416
416
 
417
- content = blob_content(tree, ".gitmodules")
418
- parse_gitmodules(tree, content)
417
+ content = blob_content(commit, ".gitmodules")
418
+ parse_gitmodules(commit, content)
419
419
  end
420
420
 
421
421
  # Return total commits count accessible from passed ref
@@ -717,21 +717,21 @@ module Gitlab
717
717
  end
718
718
  end
719
719
 
720
- # Get the content of a blob for a given tree. If the blob is a commit
720
+ # Get the content of a blob for a given commit. If the blob is a commit
721
721
  # (for submodules) then return the blob's OID.
722
- def blob_content(tree, blob_name)
723
- blob_hash = tree.detect { |b| b[:name] == blob_name }
722
+ def blob_content(commit, blob_name)
723
+ blob_entry = tree_entry(commit, blob_name)
724
724
 
725
- if blob_hash[:type] == :commit
726
- blob_hash[:oid]
725
+ if blob_entry[:type] == :commit
726
+ blob_entry[:oid]
727
727
  else
728
- rugged.lookup(blob_hash[:oid]).content
728
+ rugged.lookup(blob_entry[:oid]).content
729
729
  end
730
730
  end
731
731
 
732
732
  # Parses the contents of a .gitmodules file and returns a hash of
733
733
  # submodule information.
734
- def parse_gitmodules(tree, content)
734
+ def parse_gitmodules(commit, content)
735
735
  results = {}
736
736
 
737
737
  current = ""
@@ -744,7 +744,7 @@ module Gitlab
744
744
  results[current][match_data[1]] = match_data[2]
745
745
 
746
746
  if match_data[1] == "path"
747
- results[current]["id"] = blob_content(tree, match_data[2])
747
+ results[current]["id"] = blob_content(commit, match_data[2])
748
748
  end
749
749
  end
750
750
  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: 7.0.0.rc9
4
+ version: 7.0.0.rc10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitriy Zaporozhets
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-06 00:00:00.000000000 Z
11
+ date: 2014-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gitlab-linguist