public
Fork of eventualbuddha/sake-git
Description: A set of Sake tasks to make developing with Git easier.
Clone URL: git://github.com/granth/sake-git.git
Use Ruby's grep in the git_branch helper too.
Fri Apr 11 14:24:31 -0700 2008
commit  9c0154a037ba3d8a2157d2ed63a999646fae0321
tree    d89c43406af8c5d5e1588ce3d3115f5689a2955e
parent  700ca479771f8cd176195e30f49d14623ca0b5a6
...
1
2
3
4
 
5
6
7
...
1
2
3
 
4
5
6
7
0
@@ -1,7 +1,7 @@
0
 desc "This is just here for the other tasks and isn't intended for your use"
0
 task 'git:helpers' do
0
   def git_branch
0
- `git-branch | grep \"*\"`.strip[(2..-1)]
0
+ `git-branch`.grep(/^\*/).first.strip[(2..-1)]
0
   end
0
   def git_branches
0
     `git-branch`.to_a.map { |b| b[(2..-1)].chomp }

Comments

    No one has commented yet.