unannex: Fix recently introduced bug when attempting to unannex more than one file at a time.
This commit is contained in:
parent
62ebeb00d9
commit
35a6506812
2 changed files with 10 additions and 5 deletions
|
@ -33,10 +33,13 @@ start file = isAnnexed file $ \(key, backend) -> do
|
|||
ishere <- inAnnex key
|
||||
if ishere
|
||||
then do
|
||||
g <- Annex.gitRepo
|
||||
staged <- liftIO $ Git.stagedFiles g [Git.workTree g]
|
||||
unless (null staged) $
|
||||
error "This command cannot be run when there are already files staged for commit."
|
||||
force <- Annex.getState Annex.force
|
||||
unless force $ do
|
||||
g <- Annex.gitRepo
|
||||
staged <- liftIO $ Git.stagedFiles g [Git.workTree g]
|
||||
unless (null staged) $
|
||||
error "This command cannot be run when there are already files staged for commit."
|
||||
Annex.changeState $ \s -> s { Annex.force = True }
|
||||
|
||||
showStart "unannex" file
|
||||
return $ Just $ perform file key backend
|
||||
|
@ -65,6 +68,6 @@ cleanup file key = do
|
|||
-- Commit staged changes at end to avoid confusing the
|
||||
-- pre-commit hook if this file is later added back to
|
||||
-- git as a normal, non-annexed file.
|
||||
Annex.queue "commit" ["-m", "content removed from git annex"] "--"
|
||||
Annex.queue "commit" ["-m", "content removed from git annex"] "-a"
|
||||
|
||||
return True
|
||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -1,6 +1,8 @@
|
|||
git-annex (0.21) UNRELEASED; urgency=low
|
||||
|
||||
* test: Don't rely on chmod -R working.
|
||||
* unannex: Fix recently introduced bug when attempting to unannex more
|
||||
than one file at a time.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Wed, 09 Feb 2011 00:12:11 -0400
|
||||
|
||||
|
|
Loading…
Reference in a new issue