summaryrefslogtreecommitdiff
path: root/Git.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2015-04-29 14:59:49 -0400
committerJoey Hess <joeyh@joeyh.name>2015-04-29 14:59:49 -0400
commit36852d90bc18cb7b2bddb1ce9dce39cc1f0203de (patch)
tree0419a1d67f6bb9db4ce79f8cb76b53752e2d7371 /Git.hs
parentefe7e174bfab4d0dd2e88e7b6eb859940b2228ea (diff)
downloadgit-repair-36852d90bc18cb7b2bddb1ce9dce39cc1f0203de.tar.gz
Merge from git-annex.
Diffstat (limited to 'Git.hs')
-rw-r--r--Git.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Git.hs b/Git.hs
index c9750a3..1bc789f 100644
--- a/Git.hs
+++ b/Git.hs
@@ -3,7 +3,7 @@
- This is written to be completely independant of git-annex and should be
- suitable for other uses.
-
- - Copyright 2010-2012 Joey Hess <joey@kitenet.net>
+ - Copyright 2010-2012 Joey Hess <id@joeyh.name>
-
- Licensed under the GNU GPL version 3 or higher.
-}
@@ -60,7 +60,7 @@ repoLocation Repo { location = Url url } = show url
repoLocation Repo { location = Local { worktree = Just dir } } = dir
repoLocation Repo { location = Local { gitdir = dir } } = dir
repoLocation Repo { location = LocalUnknown dir } = dir
-repoLocation Repo { location = Unknown } = undefined
+repoLocation Repo { location = Unknown } = error "unknown repoLocation"
{- Path to a repository. For non-bare, this is the worktree, for bare,
- it's the gitdir, and for URL repositories, is the path on the remote
@@ -70,12 +70,12 @@ repoPath Repo { location = Url u } = unEscapeString $ uriPath u
repoPath Repo { location = Local { worktree = Just d } } = d
repoPath Repo { location = Local { gitdir = d } } = d
repoPath Repo { location = LocalUnknown dir } = dir
-repoPath Repo { location = Unknown } = undefined
+repoPath Repo { location = Unknown } = error "unknown repoPath"
{- Path to a local repository's .git directory. -}
localGitDir :: Repo -> FilePath
localGitDir Repo { location = Local { gitdir = d } } = d
-localGitDir _ = undefined
+localGitDir _ = error "unknown localGitDir"
{- Some code needs to vary between URL and normal repos,
- or bare and non-bare, these functions help with that. -}