Is there a way to obtain/keep the overview over a git annex repository with many directories and files? For example to answer the following question in a compact way: which subdirectories of the current directory are complete locally?
The needed information is provided by both git annex list
and git annex info
, but the output of both command is very verbose and difficult to parse visually.
For example part of the output of git annex list
could be:
XXX__ foo/bar/a
XXX__ foo/bar/b
XXX__ foo/bar/c
XXX__ foo/hey/d
XXX__ foo/hey/e
XXX__ foo/hey/f
Assuming that the foo
directory contains no further files this could be compacted to
XXX__ foo/bar/
XXX__ foo/hey/
or even
XXX__ foo/
Of course the above procedure would only compact directories if all files have the same presence status. But I guess that this will be true in many cases.
I’m thinking about implementing this as a filter to the output of git annex list
, but wanted to check whether similar ideas haven’t been considered here before. (I could not find anything.)
I am confused by what you mean by "keep the overview over a git annex repository" and "are complete locally" (do you mean "are completely local"?)
It appears you are requesting an alternative representation of the working tree with folders collapsed if the locations for all contained annexed files are the same. However what that representation means is confusing: "this folder (not file) has copies in these locations". Folders are not synced across remotes: file content is.
annex list
is meant to see exactly what file content exists where and if that content is trusted (X
) or untrusted (x
). What if there are non-annexed files in that folder? The collapsed view almost seems to indicate that maybe these files exist in those locations, too.This also does not appear to have much to do with
git annex info
.If you are overwhelmed by the information density, time with the git-annex will help you understand why what it reports is important. Also if terminal history clutter adds to your information overwhelm, you can use
command | less
to use a terminal pager to help parse longer form information.