refactored and generalized pre-command sanity checking

This commit is contained in:
Joey Hess 2011-10-27 16:31:35 -04:00
parent 66194684ac
commit 5b74b130a3
38 changed files with 73 additions and 67 deletions

View file

@ -15,9 +15,11 @@ import Utility.FileMode
command :: [Command]
command =
[ repoCommand "unlock" paramPaths seek "unlock files for modification"
, repoCommand "edit" paramPaths seek "same as unlock"
[ c "unlock" "unlock files for modification"
, c "edit" "same as unlock"
]
where
c n = Command n paramPaths needsRepo seek
seek :: [CommandSeek]
seek = [withFilesInGit start]