Previously the tracked files were sorted, and then the files and their
parent directories were considered for possible alternates. Depending on
the length of directories and names of files, inconsistencies would
occur because the directory separator (/) would be part of the sorting.
To fix this, a unique list of tracked files and their parent directories
are sorted into a single list which is processed.
The new test system is written with py.test. These tests are more
comprehensive, run faster by an order of magnitude, and are far more
maintainable. The tests themselves conform to PEP8.
The new ignore command does the following:
1. Scans ~/.yadm/encrypt and adds its entries to ~/.gitignore.
If ~/.gitignore doesn't exist, it's created. Any lines that begin
with # or ! are skipped, as well. If the entry is already in
~/.gitignore (either as /file, !/file, file, or !file), it's
skipped. While 'file' and '!file' could lead to unintended skips,
not including them would more likely lead to unintended skips.
2. Scans the list of actual files found that match ~/.yadm/encrypt
entries, and adds them to ~/.gitignore. For example, if
~/.yadm/encrypt contains .ssh/config##Linux, and .ssh/config exists,
it adds .ssh/config to ~/.gitignore, unless the entry is already in
~/.gitignore (either as /file, !/file, file, or !file).
- Since ~/.yadm/encrypt entries are rooted in $YADM_WORK without a
leading slash, a leading slash is added to the ~/.gitignore entries
to provide matching equivalency.
- A new option --yadm-ignore allows the user to override the location
of ~/.gitignore.
- Uses sed to trim any leading or trailing whitespace when reading
~/.yadm/encrypt and ~/.gitignore.
Update version number and update documentation
* Add basic Zsh completion (#71, #79)
* Support directories in `.yadm/encrypt` (#81, #82)
* Support exclusions in `.yadm/encrypt` (#86)
* Improve portability with printf (#87)
* Eliminate usage of `eval` and `ls`
`eval` has always been used to process the globs in `.yadm/encrypt`.
This is being removed, as there is a risk of executing "dirty" data
found in `.yadm/encrypt`.
Caveats of this change:
* Brace and tilde expansion will no longer work in `.yadm/encrypt`
* Paths with spaces must not be quoted anymore