summaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Command')
-rw-r--r--Command/Add.hs2
-rw-r--r--Command/AddUrl.hs2
2 files changed, 2 insertions, 2 deletions
diff --git a/Command/Add.hs b/Command/Add.hs
index 82287be0b..cd18f6c72 100644
--- a/Command/Add.hs
+++ b/Command/Add.hs
@@ -29,7 +29,7 @@ seek = [withFilesNotInGit start, withFilesUnlocked start]
- moving it into the annex directory and setting up the symlink pointing
- to its content. -}
start :: BackendFile -> CommandStart
-start p@(_, file) = notAnnexed file $ do
+start p@(_, file) = notBareRepo $ notAnnexed file $ do
s <- liftIO $ getSymbolicLinkStatus file
if isSymbolicLink s || not (isRegularFile s)
then stop
diff --git a/Command/AddUrl.hs b/Command/AddUrl.hs
index e974d06a1..4382a9c07 100644
--- a/Command/AddUrl.hs
+++ b/Command/AddUrl.hs
@@ -26,7 +26,7 @@ seek :: [CommandSeek]
seek = [withStrings start]
start :: String -> CommandStart
-start s = do
+start s = notBareRepo $ do
let u = parseURI s
case u of
Nothing -> error $ "bad url " ++ s