From 24c7d9ba78959d28c7d9cbfdecef09ddfb539f06 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 17 May 2021 14:12:15 -0400 Subject: [PATCH] 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. --- Command/FilterBranch.hs | 1 - doc/git-annex-filter-branch.mdwn | 10 +++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Command/FilterBranch.hs b/Command/FilterBranch.hs index acd72c82b2..d405ce7141 100644 --- a/Command/FilterBranch.hs +++ b/Command/FilterBranch.hs @@ -189,7 +189,6 @@ seek o = withOtherTmp $ \tmpdir -> do cmode <- annexCommitMode <$> Annex.getGitConfig cmessage <- Annex.Branch.commitMessage c <- inRepo $ Git.commitTree cmode cmessage [] t - -- TODO export.log trees liftIO $ putStrLn (fromRef c) where ww = WarnUnmatchLsFiles diff --git a/doc/git-annex-filter-branch.mdwn b/doc/git-annex-filter-branch.mdwn index 9f6e2c4fcf..14e6bf85a6 100644 --- a/doc/git-annex-filter-branch.mdwn +++ b/doc/git-annex-filter-branch.mdwn @@ -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 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 --private` being used), that private information will be included when 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, 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 * `path`