diff options
Diffstat (limited to 'lib/git')
-rw-r--r-- | lib/git/branch.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/git/branch.rb b/lib/git/branch.rb index cc33970..bf4d80a 100644 --- a/lib/git/branch.rb +++ b/lib/git/branch.rb @@ -1,15 +1,15 @@ module Git class Branch < Path - attr_accessor :full, :remote, :name, :current, :commit + attr_accessor :full, :remote, :name, :current @base = nil + @gcommit = nil def initialize(base, name, current = false) @remote = nil @full = name @base = base - @commit = @base.object(name) @current = current parts = name.split('/') @@ -21,5 +21,10 @@ module Git end end + def gcommit + @gcommit = @base.object(name) if !@gcommit + @gcommit + end + end end |