summaryrefslogtreecommitdiffstats
path: root/lib/git/branches.rb
diff options
context:
space:
mode:
authorscott Chacon <schacon@agadorsparticus.(none)>2007-11-23 11:50:02 -0800
committerscott Chacon <schacon@agadorsparticus.(none)>2007-11-23 11:50:02 -0800
commit3fddf300bd33b356540bee50ae17590ea9b61341 (patch)
tree8b17ce067dd67dc418ed06d023505523f243cb90 /lib/git/branches.rb
parentf1366b39891402b0db9de661ad181089bfd79053 (diff)
downloadthird_party-ruby-git-3fddf300bd33b356540bee50ae17590ea9b61341.tar.gz
third_party-ruby-git-3fddf300bd33b356540bee50ae17590ea9b61341.tar.xz
third_party-ruby-git-3fddf300bd33b356540bee50ae17590ea9b61341.zip
started the ruby-only command line git client
Diffstat (limited to 'lib/git/branches.rb')
-rw-r--r--lib/git/branches.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/git/branches.rb b/lib/git/branches.rb
index 47d001a..60ab16b 100644
--- a/lib/git/branches.rb
+++ b/lib/git/branches.rb
@@ -41,5 +41,17 @@ module Git
@branches[symbol.to_s]
end
+ def to_s
+ out = ''
+ @branches.each do |k, b|
+ if b.current
+ out += "* " + b.to_s + "\n"
+ else
+ out += " " + b.to_s + "\n"
+ end
+ end
+ out
+ end
+
end
end \ No newline at end of file