Sha256: 982c992d9edcc0ffe4dd9c955a6ab6b7d1dfc465395a7ad4201edae04ca6f397

Contents?: true

Size: 791 Bytes

Versions: 10

Compression:

Stored size: 791 Bytes

Contents

difficulty 4
description "You need to merge mybranch into the current branch (master). But there may be some incorrect changes in mybranch which may cause conflicts. Solve any merge-conflicts you come across and finish the merge."

setup do
  init_from_level
end

solution do
  solved = true

  solved = false unless repo.head.name == "master"
  solved = false unless repo.commits("master")[0].parents.length == 2

  txt = File.read("poem.txt")
  solved = false if txt =~ /[<>=|]/
  solved = false unless txt =~ /Sat on a wall/

  solved
end

hint do
  puts ["First you have to do a merge. Then resolve any conflicts and finish the merge", "Take a look at the sections on merge conflicts in 'git merge'.", "Remove the unnecessary lines in `poem.txt`, so only the correct poem remains."]
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
githug-0.5.0 levels/conflict.rb
githug-0.4.8 levels/conflict.rb
githug-0.4.7 levels/conflict.rb
githug-0.4.6 levels/conflict.rb
githug-0.4.5 levels/conflict.rb
githug-0.4.4 levels/conflict.rb
githug-0.4.3 levels/conflict.rb
githug-0.4.2 levels/conflict.rb
githug-0.4.1 levels/conflict.rb
githug-0.4.0 levels/conflict.rb