adjust --hide-missing

* At long last there's a way to hide annexed files whose content
  is missing from the working tree: git-annex adjust --hide-missing
* When already in an adjusted branch, running git-annex adjust
  again will update the branch as needed. This is mostly
  useful with --hide-missing to hide/unhide files after their content
  has been dropped or received.

Still needs integration with sync and the assistant, and not as fast as it
could be, but already usable.

This commit was sponsored by Ethan Aubin.
This commit is contained in:
Joey Hess 2018-10-18 15:32:42 -04:00
parent a6c8de84b6
commit 24838547e2
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
7 changed files with 148 additions and 23 deletions

View file

@ -0,0 +1,25 @@
[[!comment format=mdwn
username="joey"
subject="""comment 4"""
date="2018-10-18T19:27:43Z"
content="""
I implemented `git annex adjust --hide-missing`.
It can be run after any change to content availability to update
the adjusted branch, hiding or unhiding files.
My implementation is not as fast as it could be; each update
is a linear scan of the whole original branch and rebuild of the adjusted
branch. But it all works so we'll defer speeding this up to later bug
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.
* The assistant ought to update the adjusted branch at some point after
downloads, but it's not clear when. Perhaps this will need to be deferred
until it can be done more cheaply, so it can do it after every file.
"""]]