diff options
-rw-r--r-- | Seek.hs | 8 | ||||
-rw-r--r-- | debian/changelog | 1 |
2 files changed, 6 insertions, 3 deletions
@@ -141,13 +141,15 @@ withNothing _ _ = error "This command takes no parameters." withKeyOptions :: (Key -> CommandStart) -> CommandSeek -> CommandSeek withKeyOptions keyop fallbackop params = do bare <- fromRepo Git.repoIsLocalBare - allkeys <- Annex.getFlag "all" <||> pure bare + allkeys <- Annex.getFlag "all" unused <- Annex.getFlag "unused" auto <- Annex.getState Annex.auto - case (allkeys , unused, auto ) of + case (allkeys || bare , unused, auto ) of (True , False , False) -> go loggedKeys (False , True , False) -> go unusedKeys - (True , True , _ ) -> error "Cannot use --all with --unused." + (True , True , _ ) + | bare && not allkeys -> go unusedKeys + | otherwise -> error "Cannot use --all with --unused." (False , False , _ ) -> fallbackop params (_ , _ , True ) | bare -> error "Cannot use --auto in a bare repository." diff --git a/debian/changelog b/debian/changelog index 9b045a04c..d395520cb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,6 +21,7 @@ git-annex (5.20131121) UNRELEASED; urgency=low * Futher improvements to git repo repair. Has now been tested in tens of thousands of intentionally damaged repos, and successfully repaired them all. + * Allow use of --unused in bare repository. -- Joey Hess <joeyh@debian.org> Wed, 20 Nov 2013 18:30:47 -0400 |