From 1b041f5c511d94b977b3d377952d61a94a98c117 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 5 Mar 2021 14:12:34 -0400 Subject: [PATCH] avoid logging location of GIT keys It's not necessary to log location of GIT keys, because these files are not annexed files and so git-annex will never need to get them. This corresponds to code in Annex.Import that already checked before updating the location log when handling deleted files. Older versions of git-annex that used SHA1 keys for non-annexed files also unncessarily updated the location log for them. GIT keys still appear in the git-annex branch for content identifier logs, so kept the documentation of them in backends.mdwn This commit was sponsored by Jake Vosloo on Patreon. --- Command/Export.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Command/Export.hs b/Command/Export.hs index fa0920f698..9e3b592011 100644 --- a/Command/Export.hs +++ b/Command/Export.hs @@ -319,7 +319,9 @@ cleanupExport :: Remote -> ExportHandle -> Key -> ExportLocation -> Bool -> Comm cleanupExport r db ek loc sent = do liftIO $ addExportedLocation db ek loc when sent $ - logChange ek (uuid r) InfoPresent + case keyGitSha ek of + Nothing -> logChange ek (uuid r) InfoPresent + Just _ -> noop return True startUnexport :: Remote -> ExportHandle -> TopFilePath -> [Git.Sha] -> CommandStart