From 3a729487627065e4985984131a1059975755b0d0 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 6 Feb 2013 19:43:45 -0500 Subject: [PATCH] quizzer/git: Add 'git merge' question --- quizzes/git.json | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/quizzes/git.json b/quizzes/git.json index 8607339..99978bf 100644 --- a/quizzes/git.json +++ b/quizzes/git.json @@ -843,6 +843,40 @@ "tags": [ "branch" ] + }, + { + "class": "ScriptQuestion", + "interpreter": "sh", + "id": "git merge", + "prompt": "Merge the `widget-x` branch into the current branch", + "answer": "git merge widget-x", + "setup": [ + "export GIT_AUTHOR_NAME='A U Thor'", + "export GIT_AUTHOR_EMAIL=author@example.com", + "export GIT_COMMITTER_NAME='C O Mitter'", + "export GIT_COMMITTER_EMAIL=committer@example.com", + "export GIT_AUTHOR_DATE=1970-01-01T00:00:00Z", + "export GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"", + "git init", + "git commit --allow-empty -m 'Dummy commit'", + "export GIT_AUTHOR_DATE=1970-01-01T00:01:00Z", + "export GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"", + "git checkout -b widget-x", + "echo 'Widget X will be wonderful' > README", + "git add README", + "git commit -am 'Add widget-x documentation'", + "export GIT_AUTHOR_DATE=1970-01-01T00:02:00Z", + "export GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"", + "git checkout master" + ], + "teardown": [ + "git log --all --oneline --graph --decorate" + ], + "help": "http://www.kernel.org/pub/software/scm/git/docs/git-merge.html", + "tags": [ + "branch", + "merge" + ] } ] } -- 2.26.2