gitlab_git 9.0.0 → 9.0.1
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/VERSION +1 -1
- data/lib/gitlab_git/repository.rb +23 -2
- metadata +4 -3
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 918fb34f97acc6f5d4065767e005ba2b5ffed166
         | 
| 4 | 
            +
              data.tar.gz: f16d2885d1c4b20708e3b8483da85d1cd3fefcae
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: a38a52b74be4277d930c10b4735dde75e2f6a2040c2f5ceee6710a67da719adc447ea42cb46336371e8a355e0396ebe51e7e08c3ddae567b1cd2bd28ef9816b7
         | 
| 7 | 
            +
              data.tar.gz: 30ff567681ea48ce8efbe7a86f4092a38a1d3e46097d6b9e04b125365949087d11004cbfadd901bfd57a7d4532ef75056b4bc038b960b1f2de79aca23c2111bc
         | 
    
        data/VERSION
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            9.0. | 
| 1 | 
            +
            9.0.1
         | 
| @@ -240,7 +240,8 @@ module Gitlab | |
| 240 240 | 
             
                      path: nil,
         | 
| 241 241 | 
             
                      ref: root_ref,
         | 
| 242 242 | 
             
                      follow: false,
         | 
| 243 | 
            -
                      skip_merges: false
         | 
| 243 | 
            +
                      skip_merges: false,
         | 
| 244 | 
            +
                      disable_walk: false
         | 
| 244 245 | 
             
                    }
         | 
| 245 246 |  | 
| 246 247 | 
             
                    options = default_options.merge(options)
         | 
| @@ -254,8 +255,28 @@ module Gitlab | |
| 254 255 | 
             
                      return []
         | 
| 255 256 | 
             
                    end
         | 
| 256 257 |  | 
| 257 | 
            -
                     | 
| 258 | 
            +
                    if can_walk?(options)
         | 
| 259 | 
            +
                      log_by_walk(sha, options)
         | 
| 260 | 
            +
                    else
         | 
| 261 | 
            +
                      log_by_shell(sha, options)
         | 
| 262 | 
            +
                    end
         | 
| 263 | 
            +
                  end
         | 
| 264 | 
            +
             | 
| 265 | 
            +
                  def can_walk?(options)
         | 
| 266 | 
            +
                    options[:path].blank? && !options[:skip_merges] && !options[:disable_walk]
         | 
| 267 | 
            +
                  end
         | 
| 268 | 
            +
             | 
| 269 | 
            +
                  def log_by_walk(sha, options)
         | 
| 270 | 
            +
                    walk_options = {
         | 
| 271 | 
            +
                      show: sha,
         | 
| 272 | 
            +
                      sort: Rugged::SORT_DATE,
         | 
| 273 | 
            +
                      limit: options[:limit],
         | 
| 274 | 
            +
                      offset: options[:offset]
         | 
| 275 | 
            +
                    }
         | 
| 276 | 
            +
                    Rugged::Walker.walk(rugged, walk_options).to_a
         | 
| 277 | 
            +
                  end
         | 
| 258 278 |  | 
| 279 | 
            +
                  def log_by_shell(sha, options)
         | 
| 259 280 | 
             
                    cmd = %W(git --git-dir=#{path} log)
         | 
| 260 281 | 
             
                    cmd += %W(-n #{options[:limit].to_i})
         | 
| 261 282 | 
             
                    cmd += %W(--format=%H)
         | 
    
        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: 9.0. | 
| 4 | 
            +
              version: 9.0.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Dmitriy Zaporozhets
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2016-03- | 
| 11 | 
            +
            date: 2016-03-08 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: github-linguist
         | 
| @@ -111,8 +111,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 111 111 | 
             
                  version: '0'
         | 
| 112 112 | 
             
            requirements: []
         | 
| 113 113 | 
             
            rubyforge_project: 
         | 
| 114 | 
            -
            rubygems_version: 2. | 
| 114 | 
            +
            rubygems_version: 2.5.1
         | 
| 115 115 | 
             
            signing_key: 
         | 
| 116 116 | 
             
            specification_version: 4
         | 
| 117 117 | 
             
            summary: Gitlab::Git library
         | 
| 118 118 | 
             
            test_files: []
         | 
| 119 | 
            +
            has_rdoc: 
         |