diff options
author | Joey Hess <joey@kitenet.net> | 2014-02-18 20:57:14 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-02-18 20:57:14 -0400 |
commit | 935f5ed55b1ed9a218955fdd34cb40db3b1c9425 (patch) | |
tree | 0409ba3b6decae4764b39b0b4b827d093f081039 /Command/VAdd.hs | |
parent | 59d66243ab57890cbbe7fdc0a7c7c78c24702b95 (diff) |
fix view changing when in subdir
Failed reading some files with relative paths. This is a quick and dirty
fix.
Diffstat (limited to 'Command/VAdd.hs')
-rw-r--r-- | Command/VAdd.hs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Command/VAdd.hs b/Command/VAdd.hs index a79e91215..e766f3939 100644 --- a/Command/VAdd.hs +++ b/Command/VAdd.hs @@ -9,7 +9,6 @@ module Command.VAdd where import Common.Annex import Command -import Types.View import Annex.View import Logs.View import Command.View (paramView, parseViewParam, checkoutViewBranch) @@ -33,15 +32,11 @@ start params = do Unchanged -> do showNote "unchanged" next $ next $ return True + Narrowing -> next $ next $ + checkoutViewBranch view' narrowView Widening -> error "Widening view to match more files is not currently supported." - Narrowing -> next $ perform view' calc v c [] = (v, c) calc v c (p:ps) = let (v', c') = uncurry (refineView v) (parseViewParam p) in calc v' (max c c') ps - -perform :: View -> CommandPerform -perform view = do - branch <- narrowView view - next $ checkoutViewBranch view branch |