From fb8ab2469d389e5b1e554831eeb8b7c7a072d5d7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 16 May 2016 13:36:36 -0400 Subject: [PATCH] assistant: Fix bug that caused v6 pointer files to be annexed by the assistant. --- Assistant/Threads/Watcher.hs | 6 +++++- debian/changelog | 2 ++ ...ntral_annex_+_assistant_+_v6___61___weirdness__63__.mdwn | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Assistant/Threads/Watcher.hs b/Assistant/Threads/Watcher.hs index 1a3acbbfd6..1f50065b9c 100644 --- a/Assistant/Threads/Watcher.hs +++ b/Assistant/Threads/Watcher.hs @@ -221,7 +221,11 @@ shouldRestage :: DaemonStatus -> Bool shouldRestage ds = scanComplete ds || forceRestage ds onAddUnlocked :: Bool -> GetFileMatcher -> Handler -onAddUnlocked = onAddUnlocked' False contentchanged addassociatedfile addlink samefilestatus +onAddUnlocked symlinkssupported matcher f fs = do + mk <- liftIO $ isPointerFile f + case mk of + Nothing -> onAddUnlocked' False contentchanged addassociatedfile addlink samefilestatus symlinkssupported matcher f fs + Just k -> addlink f k where addassociatedfile key file = Database.Keys.addAssociatedFile key diff --git a/debian/changelog b/debian/changelog index a653efdfd9..af54ed566e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,8 @@ git-annex (6.20160512) UNRELEASED; urgency=medium * adjust: If the adjusted branch already exists, avoid overwriting it, since it might contain changes that have not yet been propigated to the original branch. + * assistant: Fix bug that caused v6 pointer files to be annexed by the + assistant. -- Joey Hess Wed, 11 May 2016 16:08:38 -0400 diff --git a/doc/bugs/Central_annex_+_assistant_+_v6___61___weirdness__63__.mdwn b/doc/bugs/Central_annex_+_assistant_+_v6___61___weirdness__63__.mdwn index 5afd3d31af..4acf81e7bb 100644 --- a/doc/bugs/Central_annex_+_assistant_+_v6___61___weirdness__63__.mdwn +++ b/doc/bugs/Central_annex_+_assistant_+_v6___61___weirdness__63__.mdwn @@ -102,3 +102,5 @@ Everything up-to-date ### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders) It seems to work really well on v5, but the v6 file "corruption" is difficult to recover from. + +> [[fixed|done]] --[[Joey]]