bin/pull_req_data_extraction.rb
# List of files in a project checkout. Filter is an optional binary function
# that takes a file entry and decides whether to include it in the result.
List of files in a project checkout. Filter is an optional binary function
that takes a file entry and decides whether to include it in the result.
List of files in a project checkout . Filter is an optional binary function that takes a file entry and decides whether to include it in the result .
def files_at_commit(sha, filter = lambda { true })
    begin
      files = lslr(git.lookup(sha).tree)
      if files.size <= 0
        log "No files for commit #{sha}"
      end
      files.select { |x| filter.call(x) }
    rescue StandardError => e
      log "Cannot find commit #{sha} in base repo"
      []
    end
  end
def files_at_commit ( sha , filter = lambda { true } ) begin files = lslr ( git . lookup ( sha ) . tree ) if files . size <= 0 log "No files for commit #{sha}" end files . select { | x | filter . call ( x ) } rescue StandardError => e log "Cannot find commit #{sha} in base repo" [ ] end end
List of files in a project checkout.
List of files in a project checkout .
sha
filter
lambda