nocommit does not make sense in unannex mode

This commit is contained in:
Joey Hess 2010-10-16 22:43:38 -04:00
parent da453ba701
commit 96451ac392

View file

@ -122,6 +122,10 @@ addCmd file = inBackend file err $ do
{- Undo addCmd. -}
unannexCmd :: FilePath -> Annex ()
unannexCmd file = notinBackend file err $ \(key, backend) -> do
nocommit <- Annex.flagIsSet NoCommit
if (nocommit)
then error "--nocommit cannot be used in unannex mode"
else do
Backend.removeKey backend key
logStatus key ValueMissing
g <- Annex.gitRepo