reinit: New command that can initialize a new reposotory using the configuration of a previously known repository. Useful if a repository got deleted and you want to clone it back the way it was.

This commit is contained in:
Joey Hess 2014-04-15 20:13:35 -04:00
parent 162565d928
commit 915d038bec
8 changed files with 81 additions and 11 deletions

View file

@ -8,6 +8,8 @@
module Types.UUID where
import qualified Data.Map as M
import qualified Data.UUID as U
import Data.Maybe
-- A UUID is either an arbitrary opaque string, or UUID info may be missing.
data UUID = NoUUID | UUID String
@ -21,4 +23,7 @@ toUUID :: String -> UUID
toUUID [] = NoUUID
toUUID s = UUID s
isUUID :: String -> Bool
isUUID = isJust . U.fromString
type UUIDMap = M.Map UUID String