Skip to content

Commit

Permalink
init ticgitng branch unless 'ticgit' or 'ticgit-ng' exists
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffWelling committed Feb 25, 2011
1 parent 6c357e6 commit e0f2b43
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/ticgit-ng/base.rb
Expand Up @@ -295,7 +295,8 @@ def read_tickets

bs = git.lib.branches_all.map{|b| b.first }

unless bs.include?('ticgit-ng') && File.directory?(@tic_working)
unless (bs.include?('ticgit-ng') || bs.include?('ticgit')) &&
File.directory?(@tic_working)
init_ticgitng_branch(bs.include?('ticgit-ng'))
end

Expand Down Expand Up @@ -348,7 +349,8 @@ def in_branch(branch_exists = true)
git.lib.change_head_branch('ticgit-ng')
git.with_index(@tic_index) do
git.with_working(@tic_working) do |wd|
git.lib.checkout('ticgit-ng') if needs_checkout && branch_exists
git.lib.checkout('ticgit-ng') if needs_checkout &&
branch_exists
yield wd
end
end
Expand Down

0 comments on commit e0f2b43

Please sign in to comment.