Class: Rugged::Reference

Inherits:
Object
  • Object
show all
Defined in:
lib/ext/rugged.rb

Instance Method Summary collapse

Instance Method Details

#local?Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/ext/rugged.rb', line 3

def local?
  !remote?
end

#targets?(reference) ⇒ Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/ext/rugged.rb', line 23

def targets?(reference)
  target == reference.target
end

#timeObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/ext/rugged.rb', line 7

def time
  #
  # we can't just use `target.time` here, because that
  # corresponds to the time attribute for the commit's
  # so-called "committer", not for its "author"...
  #
  # for regular commits these two time attributes will be
  # the same, but after rebasing for instance "committer"
  # will be different from "author", as will their "time"
  # attributes
  #
  # see also: https://git.io/fhNEv
  #
  target.author[:time]
end