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.
This commit is contained in:
Joey Hess 2021-03-05 14:12:34 -04:00
parent fc61915230
commit 1b041f5c51
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -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