sync --content now supports --hide-missing adjusted branches
This relies on git ls-files --with-tree, which I'm using in a way that its man page does not document. Hm. I emailed the git list to try to get the docs improved, but at least the git test suite does test the same kind of use case I'm using here. Performance impact when not in an adjusted branch is limited to some additional MVar accesses, and a single git call to determine the name of the current branch. So very minimal. When in an adjusted branch, the performance impact is in Annex.WorkTree.lookupFile, which starts doing an equal amount of work for files that didn't exist as it already did for files that were unlocked. This commit was sponsored by Jochen Bartl on Patreon.
This commit is contained in:
parent
8be5a7269a
commit
4a788fbb3b
9 changed files with 89 additions and 31 deletions
|
@ -54,11 +54,15 @@ This command can only be used in a v6 git-annex repository.
|
|||
changes, so if you `git annex drop` files, they will become broken
|
||||
links in the usual way. And when files that were missing are copied into the
|
||||
repository from elsewhere, they won't immediatly become visible in the
|
||||
branch.
|
||||
branch.
|
||||
|
||||
To update the adjusted branch to reflect changes to content availability,
|
||||
run `git annex adjust --hide-missing` again.
|
||||
|
||||
Despite missing files being hidden, `git annex sync --content` will
|
||||
still operate on them, and can be used to download missing
|
||||
files from remotes.
|
||||
|
||||
This option can be combined with --unlock or --fix.
|
||||
|
||||
# SEE ALSO
|
||||
|
|
|
@ -70,15 +70,15 @@ by running "git annex sync" on the remote.
|
|||
* `--content`, `--no-content`
|
||||
|
||||
Normally, syncing does not transfer the contents of annexed files.
|
||||
The --content option causes the content of files in the work tree
|
||||
The --content option causes the content of annexed files
|
||||
to also be uploaded and downloaded as necessary.
|
||||
|
||||
The `annex.synccontent` configuration can be set to true to make content
|
||||
be synced by default.
|
||||
|
||||
Normally this tries to get each annexed file in the work tree
|
||||
that the local repository does not yet have, and then copies each
|
||||
file in the work tree to every remote that it is syncing with.
|
||||
Normally this tries to get each annexed file that the local repository
|
||||
does not yet have, and then copies each file to every remote that it
|
||||
is syncing with.
|
||||
This behavior can be overridden by configuring the preferred content
|
||||
of a repository. See [[git-annex-preferred-content]](1).
|
||||
|
||||
|
@ -88,7 +88,7 @@ by running "git annex sync" on the remote.
|
|||
|
||||
* `--content-of=path` `-C path`
|
||||
|
||||
While --content operates on all annexed files in the work tree,
|
||||
While --content operates on all annexed files,
|
||||
--content-of allows limiting the transferred files to ones in a given
|
||||
location.
|
||||
|
||||
|
|
|
@ -14,8 +14,6 @@ reports about it being too slow. ;)
|
|||
|
||||
What still needs to be done:
|
||||
|
||||
* `git annex sync --content` needs to scan the original branch, not the
|
||||
adjusted branch, to find files to transfer.
|
||||
* `git annex sync` needs to update the adjusted branch.
|
||||
* The assistant also needs to scan the original branch when looking for
|
||||
files to download.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue