summaryrefslogtreecommitdiff
path: root/Git
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-03-12 08:09:31 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-03-12 08:09:31 -0400
commitb7024d4761b2b5737f447a6cc8e5908fc402f124 (patch)
treed53aca8a4eb3ae92d70821431a04e3240c9730dc /Git
parent59227667ea41c7e255c2124ebf346c408c56eaa2 (diff)
webapp: DTRT when told to create a git repo that already exists.
Diffstat (limited to 'Git')
-rw-r--r--Git/Construct.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Git/Construct.hs b/Git/Construct.hs
index f9f4b464a..7500617a0 100644
--- a/Git/Construct.hs
+++ b/Git/Construct.hs
@@ -18,6 +18,7 @@ module Git.Construct (
fromRemoteLocation,
repoAbsPath,
newFrom,
+ checkForRepo,
) where
import System.Posix.User
@@ -211,6 +212,8 @@ expandTilde = expandt True
| c == '/' = (n, cs)
| otherwise = findname (n++[c]) cs
+{- Checks if a git repository exists in a directory. Does not find
+ - git repositories in parent directories. -}
checkForRepo :: FilePath -> IO (Maybe RepoLocation)
checkForRepo dir =
check isRepo $