diff options
author | Joey Hess <joey@kitenet.net> | 2011-10-29 19:16:45 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-10-29 19:16:45 -0400 |
commit | 22e9f445ab74041321d731fd6290f2922384753b (patch) | |
tree | 7d794ff1e9a638849ef46787f2f7f4fa9f27e2e9 | |
parent | c102e63595d502c2424552b29e338ab71cb4a098 (diff) |
unused, dropunused: Now work in bare repositories.
Turned out I had already done all the work needed to support this when
unused started checking all branches.
-rw-r--r-- | Command/DropUnused.hs | 2 | ||||
-rw-r--r-- | Command/Unused.hs | 2 | ||||
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | doc/bare_repositories.mdwn | 20 | ||||
-rw-r--r-- | doc/todo/support_fsck_in_bare_repos.mdwn | 2 |
5 files changed, 13 insertions, 14 deletions
diff --git a/Command/DropUnused.hs b/Command/DropUnused.hs index d2eb3df71..07ae1b48c 100644 --- a/Command/DropUnused.hs +++ b/Command/DropUnused.hs @@ -35,7 +35,7 @@ withUnusedMaps params = do return $ map (start (unused, unusedbad, unusedtmp)) params start :: (UnusedMap, UnusedMap, UnusedMap) -> FilePath -> CommandStart -start (unused, unusedbad, unusedtmp) s = notBareRepo $ search +start (unused, unusedbad, unusedtmp) s = search [ (unused, perform) , (unusedbad, performOther gitAnnexBadLocation) , (unusedtmp, performOther gitAnnexTmpLocation) diff --git a/Command/Unused.hs b/Command/Unused.hs index a6cced27f..7e9ffa01f 100644 --- a/Command/Unused.hs +++ b/Command/Unused.hs @@ -36,7 +36,7 @@ seek = [withNothing start] {- Finds unused content in the annex. -} start :: CommandStart -start = notBareRepo $ do +start = do from <- Annex.getState Annex.fromremote let (name, action) = case from of Nothing -> (".", checkUnused) diff --git a/debian/changelog b/debian/changelog index 42454fe8f..e553877de 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,7 @@ git-annex (3.20111026) UNRELEASED; urgency=low and file contents. Does not check that numcopies is satisfied, as .gitattributes information about numcopies is not available in a bare repository. + * unused, dropunused: Now work in bare repositories. -- Joey Hess <joeyh@debian.org> Thu, 27 Oct 2011 13:58:53 -0400 diff --git a/doc/bare_repositories.mdwn b/doc/bare_repositories.mdwn index c5663d84c..f2a3ea4e9 100644 --- a/doc/bare_repositories.mdwn +++ b/doc/bare_repositories.mdwn @@ -7,16 +7,12 @@ Of course, for that to work, the bare repository has to be on a system with [[git-annex-shell]] installed. If "origin" is on GitWeb, you still can't use git-annex to store stuff there. -Known to work ok: +It took a while, but bare repositories are now supported exactly as well +as non-bare repositories. Except for these caveats: -* `git annex move --to` and `--from`, when pointed at a bare repository. -* `git annex copy` ditto. -* `git annex drop` can check that a bare repository has a copy of data - that is being dropped. -* `git annex get` can transfer data from a bare repository. -* Most other stuff (ie, init, describe, trust, etc.) - -There are a few caveats to keep in mind when using bare repositories: - -* A few subcommands, like `unused` cannot be run in a bare repository. - Those subcommands will refuse to do anything. +* `git annex fsck` works in a bare repository, but does not display + warnings about insufficient + [[copies]]. To get those warnings, just run it in one of the non-bare + 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.. diff --git a/doc/todo/support_fsck_in_bare_repos.mdwn b/doc/todo/support_fsck_in_bare_repos.mdwn index 31481a4a7..32ced467e 100644 --- a/doc/todo/support_fsck_in_bare_repos.mdwn +++ b/doc/todo/support_fsck_in_bare_repos.mdwn @@ -12,4 +12,6 @@ What is says on the tin: >> Fsck is done. Rest not done yet. --[[Joey]] +>>> all [[done]]! --[[Joey]] + [[!meta title="support unused, dropunused in bare repos"]] |