Currently, when moss --directory $ROOT sync --to $TARGET is run, in the blitting phase it will rm -rf $TARGET and then blit into $TARGET/usr. .moss is located in $ROOT/.moss in this case.
I suggest instead of --to and --directory, we use --moss-dir and slightly change how --directory works:
--directory $ROOT will be the target that is blitted to, where triggers run, etc
--moss-dir $MOSS_DIR will be the .moss directory
By default, --directory $ROOT will implicitly set --moss-dir $ROOT/.moss, so that behavior stays the same. If the moss directory is not on the same filesystem as the root, then this should emit a warning, as doing that is very inefficient.
What's nice with this terminology is that it mirrors GIT_DIR and GIT_WORK_TREE: GIT_DIR is the same as --moss-dir and GIT_WORK_TREE is the same as --directory.
I think it would be good to also rename ephemeral roots to detached roots, or something similar.
For aerbox I want to have the moss dir be in $XDG_DATA_HOME/aerbox/moss, and this is currently not possible, as it's not possible to set the location of .moss directly. Best I can do here is $XDG_DATA_HOME/aerbox/moss/.moss.
Currently, when
moss --directory $ROOT sync --to $TARGETis run, in the blitting phase it willrm -rf $TARGETand then blit into$TARGET/usr..mossis located in$ROOT/.mossin this case.I suggest instead of
--toand--directory, we use--moss-dirand slightly change how--directoryworks:--directory $ROOTwill be the target that is blitted to, where triggers run, etc--moss-dir $MOSS_DIRwill be the.mossdirectoryBy default,
--directory $ROOTwill implicitly set--moss-dir $ROOT/.moss, so that behavior stays the same. If the moss directory is not on the same filesystem as the root, then this should emit a warning, as doing that is very inefficient.What's nice with this terminology is that it mirrors
GIT_DIRandGIT_WORK_TREE:GIT_DIRis the same as--moss-dirandGIT_WORK_TREEis the same as--directory.I think it would be good to also rename ephemeral roots to detached roots, or something similar.
For
aerboxI want to have the moss dir be in$XDG_DATA_HOME/aerbox/moss, and this is currently not possible, as it's not possible to set the location of.mossdirectly. Best I can do here is$XDG_DATA_HOME/aerbox/moss/.moss.