lib/git_wrapper/repository.rb in git_wrapper-1.0.1 vs lib/git_wrapper/repository.rb in git_wrapper-1.0.2
- old
+ new
@@ -108,10 +108,11 @@
def branches
execute(Commands::Branch.new(@location).list)
end
def current_branch
- execute(Commands::Branch.new(@location).current)
+ branch = execute(Commands::Branch.new(@location).current)
+ branch.nil? ? 'master' : branch
end
def branch(name, commit=nil)
if commit.nil?
execute(Commands::Branch.new(@location).create(name))
\ No newline at end of file