Sha256: 4ef86e341b164aed9e9dd147942d29d5cb8d3545c14b7d30c9d229299592bb7b

Contents?: true

Size: 597 Bytes

Versions: 1

Compression:

Stored size: 597 Bytes

Contents

module AlpacaBuildTool
  ##
  # Git provides methods to help with git version control tool
  module Git
    ##
    # Returns string with changes in dir
    #
    # +dir+:: specific dir where to look for changes
    # +commit_from+:: commit from which look for changes(nil by default to
    # look for all changes)
    def self.changes(dir, commit_from = nil)
      return `git log -- #{dir}` unless commit_from
      `git log #{commit_from}..HEAD -- #{dir}`
    end

    ##
    # Returns current revision id
    def self.revision
      `git rev-parse HEAD`
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
alpacabuildtool-1.0.0 lib/alpacabuildtool/tools/git.rb