add forget command

Works, more or less. --dead is not implemented, and so far a new branch
is made, but keys no longer present anywhere are not scrubbed.

git annex sync fails to push the synced/git-annex branch after a forget,
because it's not a fast-forward of the existing synced branch. Could be
fixed by making git-annex sync use assistant-style sync branches.
This commit is contained in:
Joey Hess 2013-08-28 16:38:03 -04:00
parent fcd5c167ef
commit 4a915cd3cd
5 changed files with 51 additions and 5 deletions

View file

@ -402,6 +402,7 @@ handleTransitions :: Transitions -> [Git.Ref] -> Annex (Maybe (Git.Branch, [Git.
handleTransitions localts refs = do
m <- M.fromList <$> mapM getreftransition refs
let remotets = M.elems m
liftIO $ print ("transitions", localts, remotets)
if all (localts ==) remotets
then return Nothing
else do