4a788fbb3b
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.
82 lines
2.4 KiB
Markdown
82 lines
2.4 KiB
Markdown
# NAME
|
|
|
|
git-annex adjust - enter an adjusted branch
|
|
|
|
# SYNOPSIS
|
|
|
|
git annex adjust `--unlock|--fix|--hide-missing [--unlock|--fix]`
|
|
|
|
# DESCRIPTION
|
|
|
|
Enters an adjusted form of the current branch. The annexed files will
|
|
be treated differently. For example with --unlock all annexed files will
|
|
be unlocked.
|
|
|
|
The adjusted branch will have a name like "adjusted/master(unlocked)".
|
|
Since it's a regular git branch, you can use `git checkout` to switch
|
|
back to the original branch at any time.
|
|
|
|
While in the adjusted branch, you can use git-annex and git commands as
|
|
usual. Any commits that you make will initially only be made to the
|
|
adjusted branch.
|
|
|
|
To propagate commits from the adjusted branch back to the original branch,
|
|
and to other repositories, as well as to merge in changes from other
|
|
repositories, run `git annex sync`.
|
|
|
|
Re-running this command with the same options
|
|
while inside the adjusted branch will update the adjusted branch
|
|
as necessary (eg for `--hide-missing`), and will also propagate commits
|
|
back to the original branch.
|
|
|
|
This command can only be used in a v6 git-annex repository.
|
|
|
|
# OPTIONS
|
|
|
|
* `--unlock`
|
|
|
|
Unlock all annexed files in the adjusted branch. This allows
|
|
annexed files to be modified.
|
|
|
|
* `--fix`
|
|
|
|
Fix the symlinks to annexed files to point to the local git annex
|
|
object directory. This can be useful if a repository is checked out in an
|
|
unusual way that prevents the symlinks committed to git from pointing at
|
|
the annex objects.
|
|
|
|
* `--hide-missing`
|
|
|
|
Only include annexed files in the adjusted branch when their content
|
|
is present.
|
|
|
|
The adjusted branch is not immediately changed when content availability
|
|
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.
|
|
|
|
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
|
|
|
|
[[git-annex]](1)
|
|
|
|
[[git-annex-unlock]](1)
|
|
|
|
[[git-annex-upgrade]](1)
|
|
|
|
[[git-annex-sync]](1)
|
|
|
|
# AUTHOR
|
|
|
|
Joey Hess <id@joeyh.name>
|
|
|
|
Warning: Automatically converted into a man page by mdwn2man. Edit with care.
|