Class Git::Log
In: lib/git/log.rb
Parent: Object

object that holds the last X commits on given branch

Methods

author   between   each   first   grep   new   object   path   since   size   to_s   until  

Included Modules

Enumerable

Public Class methods

[Source]

# File lib/git/log.rb, line 19
    def initialize(base, count = 30)
      dirty_log
      @base = base
      @count = count
    end

Public Instance methods

[Source]

# File lib/git/log.rb, line 31
    def author(regex)
      dirty_log
      @author = regex
      return self
    end

[Source]

# File lib/git/log.rb, line 61
    def between(sha1, sha2 = nil)
      dirty_log
      @between = [sha1, sha2]
      return self
    end

[Source]

# File lib/git/log.rb, line 79
    def each
      check_log
      @commits.each do |c|
        yield c
      end
    end

[Source]

# File lib/git/log.rb, line 86
    def first
      check_log
      @commits.first rescue nil
    end

[Source]

# File lib/git/log.rb, line 37
    def grep(regex)
      dirty_log
      @grep = regex
      return self
    end

[Source]

# File lib/git/log.rb, line 25
    def object(objectish)
      dirty_log
      @object = objectish
      return self
    end

[Source]

# File lib/git/log.rb, line 43
    def path(path)
      dirty_log
      @path = path
      return self
    end

[Source]

# File lib/git/log.rb, line 49
    def since(date)
      dirty_log
      @since = date
      return self
    end

forces git log to run

[Source]

# File lib/git/log.rb, line 74
    def size
      check_log
      @commits.size rescue nil
    end

[Source]

# File lib/git/log.rb, line 67
    def to_s
      self.map { |c| c.to_s }.join("\n")
    end

[Source]

# File lib/git/log.rb, line 55
    def until(date)
      dirty_log
      @until = date
      return self
    end

[Validate]