decided not to include export/import trees

They're only needed to cover a gc edge case, and it's better someone
gets caught by that edge case than that someone who does not know about
them ends up with a filtered git-annex branch that contains such a tree
when some of the files listed in it are ones they wanted to *remove*
from the repository.
This commit is contained in:
Joey Hess 2021-05-17 14:12:15 -04:00
parent 2420910ab8
commit 24c7d9ba78
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 9 additions and 2 deletions

View file

@ -189,7 +189,6 @@ seek o = withOtherTmp $ \tmpdir -> do
cmode <- annexCommitMode <$> Annex.getGitConfig cmode <- annexCommitMode <$> Annex.getGitConfig
cmessage <- Annex.Branch.commitMessage cmessage <- Annex.Branch.commitMessage
c <- inRepo $ Git.commitTree cmode cmessage [] t c <- inRepo $ Git.commitTree cmode cmessage [] t
-- TODO export.log trees
liftIO $ putStrLn (fromRef c) liftIO $ putStrLn (fromRef c)
where where
ww = WarnUnmatchLsFiles ww = WarnUnmatchLsFiles

View file

@ -25,7 +25,7 @@ With no options, no information at all will be included from the git-annex
branch. Use options to specify what to include. All options can be specified branch. Use options to specify what to include. All options can be specified
multiple times. multiple times.
Note that, when the repository contains information about a private When the repository contains information about a private
repository (due to `annex.private` being set, or `git-annex initremote repository (due to `annex.private` being set, or `git-annex initremote
--private` being used), that private information will be included when --private` being used), that private information will be included when
allowed by the options, even though it is not recorded on the git-annex allowed by the options, even though it is not recorded on the git-annex
@ -35,6 +35,14 @@ When a repository was created with `git annex initremote --sameas=foo`,
its information will be included when the information for foo is, its information will be included when the information for foo is,
and excluded when foo is excluded. and excluded when foo is excluded.
When a special remote is configured with importtree=yes or exporttree=yes,
normally the git tree corresponding to the repository is included in
the git-annex branch, to make sure it does not get garbage collected
by `git gc`. Those trees are *not* included when filtering the git-annex
branch. Usually this will not cause any problems, but if such a tree does
get garbage collected, it will prevent accessing files on the special
remote, until the next time a tree is imported or exported to it.
# OPTIONS # OPTIONS
* `path` * `path`