withRecordedMatch :: (RepoPatch p, ApplyState p ~ Tree)
                  => Repository p wR wU wT
                  -> (PatchSet p Origin wR -> DefaultIO ())
                  -> IO ()
withRecordedMatch r job
    = do createPristineDirectoryTree r "." WithWorkingDir
         readRepo r >>= runDefault . job
withRecordedMatch :: (RepoPatch p, ApplyState p ~ Tree)
                  => Repository p wR wU wT
                  -> (PatchSet p Origin wR -> DefaultIO ())
                  -> IO ()
withRecordedMatch r job
    = do createPristineDirectoryTree r "." WithWorkingDir
         readRepo r >>= runDefault . job
withRecordedMatch r job
    = do createPristineDirectoryTree r "." WithWorkingDir
         readRepo r >>= runDefault . job