From ef5330120c0b522ff159a5b3caba7a926236947b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 29 Oct 2011 19:30:48 -0400 Subject: [PATCH] bare cleanup --- Command/Add.hs | 2 +- Command/AddUrl.hs | 2 +- doc/bare_repositories.mdwn | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Command/Add.hs b/Command/Add.hs index 82287be0bf..cd18f6c725 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 e974d06a14..4382a9c07a 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 diff --git a/doc/bare_repositories.mdwn b/doc/bare_repositories.mdwn index f2a3ea4e94..3bc0a22cbd 100644 --- a/doc/bare_repositories.mdwn +++ b/doc/bare_repositories.mdwn @@ -16,3 +16,5 @@ as non-bare repositories. Except for these caveats: checkouts. * `git annex unused` in a bare repository only knows about keys used in branches that have been pushed to the bare repository. So use it with care.. +* Commands that need a work tree, like `git annex add` won't work in a bare + repository, of course.