ensureProperty takes a list of commands to run, but Git.bareRepo

previously passed a list of arguments instead.

Signed-Off-By: Jelmer Vernooij <jelmer@debian.org>
This commit is contained in:
Jelmer Vernooij 2015-04-22 20:59:14 -04:00 committed by Joey Hess
parent 4bd933118d
commit c7a156a8c3
1 changed files with 3 additions and 3 deletions

View File

@ -103,15 +103,15 @@ bareRepo repo user gitshared = check (isRepo repo) $ propertyList ("git repo: "
dirExists repo : case gitshared of dirExists repo : case gitshared of
NotShared -> NotShared ->
[ ownerGroup repo user (userGroup user) [ ownerGroup repo user (userGroup user)
, userScriptProperty user ["git", "init", "--bare", "--shared=false", repo] , userScriptProperty user ["git init --bare --shared=false " ++ shellEscape repo]
] ]
SharedAll -> SharedAll ->
[ ownerGroup repo user (userGroup user) [ ownerGroup repo user (userGroup user)
, userScriptProperty user ["git", "init", "--bare", "--shared=all", repo] , userScriptProperty user ["git init --bare --shared=all " ++ shellEscape repo]
] ]
Shared group' -> Shared group' ->
[ ownerGroup repo user group' [ ownerGroup repo user group'
, userScriptProperty user ["git", "init", "--bare", "--shared=group", repo] , userScriptProperty user ["git init --bare --shared=group " ++ shellEscape repo]
] ]
where where
isRepo repo' = isNothing <$> catchMaybeIO (readProcess "git" ["rev-parse", "--resolve-git-dir", repo']) isRepo repo' = isNothing <$> catchMaybeIO (readProcess "git" ["rev-parse", "--resolve-git-dir", repo'])