Skip to content

Commit

Permalink
Updated the conflict level to make more sense for the user.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Van Liew authored and Alex committed Oct 27, 2013
1 parent 742f013 commit d8a6aaf
Show file tree
Hide file tree
Showing 17 changed files with 32 additions and 8 deletions.
6 changes: 3 additions & 3 deletions levels/conflict.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
solved = false unless repo.commits("master")[0].parents.length == 2

txt = `cat poem.txt`
solved = false if txt =~ /[<>=]/
solved = false if txt =~ /cool poem/
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, leaving the correct version of the poem."]
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
15 changes: 13 additions & 2 deletions levels/conflict/.githug/COMMIT_EDITMSG
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
Added comment
Updated the poem

Signed-off-by: Thameera Senanayaka <[email protected]>
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# Author: Thameera Senanayaka <[email protected]>
# Committer: Alex <[email protected]>
#
# On branch master
# Changes to be committed:
# (use "git reset HEAD^1 <file>..." to unstage)
#
# modified: poem.txt
#
Binary file modified levels/conflict/.githug/index
Binary file not shown.
6 changes: 6 additions & 0 deletions levels/conflict/.githug/logs/HEAD
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@
306868e3258be1f35ae43db71e3a6d7edf42ffe7 50a127cb066eb903a6fa59d71802c10cb442fb3b Thameera Senanayaka <[email protected]> 1352041213 +0530 commit: Added lines
50a127cb066eb903a6fa59d71802c10cb442fb3b 75179304f4fab00613f08a9412b6cb0965bfa564 Thameera Senanayaka <[email protected]> 1352041234 +0530 commit: Added comment
75179304f4fab00613f08a9412b6cb0965bfa564 40e20a455ac2731ad25c297b03aa543d7eedf6ab Thameera Senanayaka <[email protected]> 1352041240 +0530 checkout: moving from mybranch to master
40e20a455ac2731ad25c297b03aa543d7eedf6ab 75179304f4fab00613f08a9412b6cb0965bfa564 Alex <[email protected]> 1382868220 -0700 checkout: moving from master to mybranch
75179304f4fab00613f08a9412b6cb0965bfa564 bdc7bec8acae9b3eabf0a15b223a48211b7a89a1 Alex <[email protected]> 1382868333 -0700 commit: Changed the poem
bdc7bec8acae9b3eabf0a15b223a48211b7a89a1 3d7aec017559be2b61cab850dafdcb2b6212f1c3 Alex <[email protected]> 1382868450 -0700 commit (amend): Changed the poem
3d7aec017559be2b61cab850dafdcb2b6212f1c3 40e20a455ac2731ad25c297b03aa543d7eedf6ab Alex <[email protected]> 1382868483 -0700 checkout: moving from mybranch to master
40e20a455ac2731ad25c297b03aa543d7eedf6ab 30cc28e66966109bb5bfbe96d6c817c367d2050a Alex <[email protected]> 1382868518 -0700 commit: Updated the poem
30cc28e66966109bb5bfbe96d6c817c367d2050a c797f979cf24ba148bf10d5e26f5d7402dd5f2e1 Alex <[email protected]> 1382868533 -0700 commit (amend): Updated the poem
2 changes: 2 additions & 0 deletions levels/conflict/.githug/logs/refs/heads/master
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
0000000000000000000000000000000000000000 306868e3258be1f35ae43db71e3a6d7edf42ffe7 Thameera Senanayaka <[email protected]> 1352041121 +0530 commit (initial): Initial commit
306868e3258be1f35ae43db71e3a6d7edf42ffe7 40e20a455ac2731ad25c297b03aa543d7eedf6ab Thameera Senanayaka <[email protected]> 1352041153 +0530 commit: Added two lines
40e20a455ac2731ad25c297b03aa543d7eedf6ab 30cc28e66966109bb5bfbe96d6c817c367d2050a Alex <[email protected]> 1382868518 -0700 commit: Updated the poem
30cc28e66966109bb5bfbe96d6c817c367d2050a c797f979cf24ba148bf10d5e26f5d7402dd5f2e1 Alex <[email protected]> 1382868533 -0700 commit (amend): Updated the poem
2 changes: 2 additions & 0 deletions levels/conflict/.githug/logs/refs/heads/mybranch
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
0000000000000000000000000000000000000000 306868e3258be1f35ae43db71e3a6d7edf42ffe7 Thameera Senanayaka <[email protected]> 1352041133 +0530 branch: Created from master
306868e3258be1f35ae43db71e3a6d7edf42ffe7 50a127cb066eb903a6fa59d71802c10cb442fb3b Thameera Senanayaka <[email protected]> 1352041213 +0530 commit: Added lines
50a127cb066eb903a6fa59d71802c10cb442fb3b 75179304f4fab00613f08a9412b6cb0965bfa564 Thameera Senanayaka <[email protected]> 1352041234 +0530 commit: Added comment
75179304f4fab00613f08a9412b6cb0965bfa564 bdc7bec8acae9b3eabf0a15b223a48211b7a89a1 Alex <[email protected]> 1382868333 -0700 commit: Changed the poem
bdc7bec8acae9b3eabf0a15b223a48211b7a89a1 3d7aec017559be2b61cab850dafdcb2b6212f1c3 Alex <[email protected]> 1382868450 -0700 commit (amend): Changed the poem
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
x=�[JC1E��(�,'���8����ISz��4�:z/R��,X���Z/�QOs0C"b�Q!r��D9e�s(=��5b��{q��m�[� M6�"��:��`��v��3-�����(T��;7j�MW��|@���\��^_@j���ZkxF�(v���<�u�/8�[�?�����~�����^h��Y�a��B�� fa�u����M
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
x��A
�0@Q�9�\@�d�d"�'�4[h��� =���y���,SGth�*d%F��٫����!�e�R1��l���� �6D®tE��T�%v�%?$��OEz�y��np����Z��:�A汾�i�\�� XbǞ��Ͱ?6�O��(�C3�Q�Yu1?6lJ�
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion levels/conflict/.githug/refs/heads/master
Original file line number Diff line number Diff line change
@@ -1 +1 @@
40e20a455ac2731ad25c297b03aa543d7eedf6ab
c797f979cf24ba148bf10d5e26f5d7402dd5f2e1
2 changes: 1 addition & 1 deletion levels/conflict/.githug/refs/heads/mybranch
Original file line number Diff line number Diff line change
@@ -1 +1 @@
75179304f4fab00613f08a9412b6cb0965bfa564
3d7aec017559be2b61cab850dafdcb2b6212f1c3
2 changes: 1 addition & 1 deletion levels/conflict/poem.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Humpty dumpty
Sat on a wall
Categorized shoes by color
Humpty dumpty
Had a great fall

0 comments on commit d8a6aaf

Please sign in to comment.