Sha256: 093123dd17aee3ba196cd5440cec1d637d0866b8cb347cd9345f5da713f1a869

Contents?: true

Size: 747 Bytes

Versions: 6

Compression:

Stored size: 747 Bytes

Contents

difficulty 4
description "You need to merge the current branch (master) with 'mybranch'. 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 = `cat poem.txt`
  solved = false if txt =~ /[<>=]/
  solved = false unless txt =~ /cool poem/

  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."]
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
githug-0.3.3 levels/conflict.rb
githug-0.3.2 levels/conflict.rb
githug-0.3.1 levels/conflict.rb
githug-0.3.0 levels/conflict.rb
githug-0.2.12 levels/conflict.rb
githug-0.2.11 levels/conflict.rb