                                                                                         (fn [args ctx]
                                                                                           (wait-for-git ctx (get-in @state [:git :remote]) "master" :ms-between-polls 100)))]
                                     (first (vals (:outputs execute-step-result)))))]
-    (swap! state #(assoc % :wait-for-result-channel wait-for-result-channel))
+    (swap! state #(assoc % :result-channel wait-for-result-channel))
     state))
 
 (defn start-clone-step [state ref cwd]

(defn commit-hash-by-msg [state msg]
  (git-utils/commit-by-msg (:git @state) msg))

(defn wait-for-git-result [state]
  (:wait-for-git-result @state))

(deftest wait-for-git-test-clean
  (testing "that it waits for a new commit to happen and that it prints out information on old and new commit hashes"

                    (wait-a-bit)
                    (git-commit "other commit")
                    (get-step-result))]
      (is (str-containing (commit-hash-by-msg state "initial commit") (:out (step-result state))))
      (is (str-containing (commit-hash-by-msg state "other commit") (:out (step-result state))))))
  (testing "that waiting returns immediately when a commit happened while it was not waiting"
    (let [state (-> (init-state)
                    (git-init)
