gitlab_git 7.0.0.rc1 → 7.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/gitlab_git/repository.rb +15 -5
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: badf0b7ecbe40208622e3e555055ab825f98ad6e
4
- data.tar.gz: f85a1a6a30411397118fe910b8f0479799ddfcf2
3
+ metadata.gz: 8663d6a95fd1eac86893a44bd52f930722519c49
4
+ data.tar.gz: f9c7a84ec37a3090261764c4c25acd5cc1cecb3c
5
5
  SHA512:
6
- metadata.gz: 4f12a58cdb7e060e72096836c8cff6ab7ca1f56870c69b09cb9af578198e27c1a39234e3c21cff566a84569dd8d02e93a89e3bb6b475443f83ab6c007bc77e49
7
- data.tar.gz: 5cc43362edf2f18cb84f6090a46e380153d5ac5b44c94e440b556c9b55ac0a0c39d8c84f11f734840d0a6559ccbab22ccdf88e17d315f627201014ad9a7489a8
6
+ metadata.gz: 43057a9d17dedbec4c797e89e54e35df0971aa583d3441e46ad2e63472731edb4296b56ed1d9e3c1d58ba7c340e2f0025f2f1a7022e55286e39674d9c6f1670e
7
+ data.tar.gz: b6ac8df1d9ee7bc266d9cfe624353046b5e345172a819aa6dffbc40fea291b187215e7afffd2dcb1ed2583df5f6aab6253ee4315ca6e7a3f2159fe956684b649
data/VERSION CHANGED
@@ -1 +1 @@
1
- 7.0.0.rc1
1
+ 7.0.0.rc2
@@ -60,7 +60,14 @@ module Gitlab
60
60
  # Returns an Array of Tags
61
61
  def tags
62
62
  rugged.references.each("refs/tags/*").map do |ref|
63
- Tag.new(ref.name, ref.target, ref.target.message.chomp)
63
+ message = nil
64
+ if ref.target.is_a?(Rugged::Tag::Annotation) &&
65
+ ref.target.target.is_a?(Rugged::Commit)
66
+ unless ref.target.target.message == ref.target.message
67
+ message = ref.target.message.chomp
68
+ end
69
+ end
70
+ Tag.new(ref.name, ref.target, message)
64
71
  end.sort_by(&:name)
65
72
  end
66
73
 
@@ -199,7 +206,6 @@ module Gitlab
199
206
  options[:offset] ||= 0
200
207
  actual_ref = options[:ref] || root_ref
201
208
  sha = sha_from_ref(actual_ref)
202
-
203
209
  build_log(sha, options)
204
210
  rescue Rugged::OdbError, Rugged::InvalidError, Rugged::ReferenceError
205
211
  # Return an empty array if the ref wasn't found
@@ -727,10 +733,14 @@ module Gitlab
727
733
  commits = []
728
734
  skipped = 0
729
735
  current_path = options[:path]
736
+ current_path = nil if current_path == ''
737
+
738
+ limit = options[:limit].to_i
739
+ offset = options[:offset].to_i
730
740
 
741
+ walker.sorting(Rugged::SORT_DATE)
731
742
  walker.each do |c|
732
- break if options[:limit].to_i > 0 &&
733
- commits.length >= options[:limit].to_i
743
+ break if limit > 0 && commits.length >= limit
734
744
 
735
745
  if !current_path ||
736
746
  commit_touches_path?(c, current_path, options[:follow])
@@ -738,7 +748,7 @@ module Gitlab
738
748
  # This is a commit we care about, unless we haven't skipped enough
739
749
  # yet
740
750
  skipped += 1
741
- commits.push(c) if skipped > options[:offset]
751
+ commits.push(c) if skipped > offset
742
752
  end
743
753
  end
744
754
 
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.rc1
4
+ version: 7.0.0.rc2
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-09-25 00:00:00.000000000 Z
11
+ date: 2014-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gitlab-linguist