summaryrefslogtreecommitdiffstats
path: root/lib/git/branch.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/git/branch.rb')
-rw-r--r--lib/git/branch.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/git/branch.rb b/lib/git/branch.rb
index 6c1bc44..5dc8ec7 100644
--- a/lib/git/branch.rb
+++ b/lib/git/branch.rb
@@ -5,12 +5,15 @@ module Git
@base = nil
@gcommit = nil
+ @stashes = nil
def initialize(base, name)
@remote = nil
@full = name
@base = base
+ @stashes = Git::Stashes.new(@base)
+
parts = name.split('/')
if parts[1]
@remote = Git::Remote.new(@base, parts[0])
@@ -25,6 +28,10 @@ module Git
@gcommit
end
+ def stashes
+ @stashes ||= Git::Stashes.new(@base)
+ end
+
def checkout
check_if_create
@base.checkout(@full)