diff options
-rw-r--r-- | Annex/View.hs | 12 | ||||
-rw-r--r-- | debian/changelog | 2 |
2 files changed, 9 insertions, 5 deletions
diff --git a/Annex/View.hs b/Annex/View.hs index 3f8f8ad17..7d2b43e60 100644 --- a/Annex/View.hs +++ b/Annex/View.hs @@ -341,22 +341,24 @@ applyView' mkviewedfile getfilemetadata view = do liftIO . nukeFile =<< fromRepo gitAnnexViewIndex uh <- withViewIndex $ inRepo Git.UpdateIndex.startUpdateIndex forM_ l $ \f -> do - relf <- getTopFilePath <$> inRepo (toTopFilePath f) - go uh relf =<< lookupFile f + topf <- inRepo (toTopFilePath f) + go uh topf =<< lookupFile f liftIO $ do void $ stopUpdateIndex uh void clean genViewBranch view where genviewedfiles = viewedFiles view mkviewedfile -- enables memoization - go uh f (Just k) = do + go uh topf (Just k) = do metadata <- getCurrentMetaData k + let f = getTopFilePath topf let metadata' = getfilemetadata f `unionMetaData` metadata forM_ (genviewedfiles f metadata') $ \fv -> do f' <- fromRepo $ fromTopFilePath $ asTopFilePath fv stagesymlink uh f' =<< calcRepo (gitAnnexLink f' k) - go uh f Nothing - | "." `isPrefixOf` f = do + go uh topf Nothing + | "." `isPrefixOf` getTopFilePath topf = do + f <- fromRepo $ fromTopFilePath topf s <- liftIO $ getSymbolicLinkStatus f if isSymbolicLink s then stagesymlink uh f =<< liftIO (readSymbolicLink f) diff --git a/debian/changelog b/debian/changelog index e60b43aa5..1b9e27dfa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,6 +17,8 @@ git-annex (6.20160512) UNRELEASED; urgency=medium is in a nonstandard place. * Work around git bug in handling of relative path to GIT_INDEX_FILE when in a subdirectory of the repository. This affected git annex view. + * Fix crash when entering/changing view in a subdirectory of a repo that + has a dotfile in its root. -- Joey Hess <id@joeyh.name> Wed, 11 May 2016 16:08:38 -0400 |