This flag was not working fine, after all.
Also, the only difference between `copier copy` and `copier update` is that copying should ignore subproject history, while updating should respect it.
Thus, the real CLI reflection of the `only_diff` option is whether you're using `copier copy` or `copier update`. Well, that's how it is now.
Besides all this, the real behavior of `only_diff=False` wasn't being tested. Fixed also, and updated docs.
Fixes#270.
When adding the `exclude` option from CLI/API, it extends the definitions found in `copier.yml`.
When adding it in `copier.yml`, it replaces the defaults.
Fixes#215, which explains that it was very unexpected that excluding some extra things included a lot of other things by accident.
It's OK that Copier deletes the destination folder by default when Copier created it. After all, if something failed, you probably don't want that dangling folder around.
However, if the folder existed before (which is always true if you're updating), Copier should not delete it. Yes, this will leave garbage there, but it will be better than removing what is no garbage by accident.
Apart from enforcing this new behavior, a new `--no-cleanup` CLI flag is exposed to `copier copy` to disable this behavior altogether. The flag is not available for `copier update` because it will never work there, as explained above.
This patch fixes#262 and closes#264.
Before this patch, using `!include` was a bit absurd because it would fail under any useful scenario:
- Including with a glob.
- Trying to include more than 1 file.
Now all those are supported, and they can coexist. Besides, the patch is quite simple, which makes it more attractive.
Fix#237.
Before this patch, Copier didn't ignore prereleases when detecting latest template tag.
This is mostly a bug because there's no way to safely upgrade a template to the latest non-prerelease tag automatically.
This a behavioral change that probably didn't hit anybody out there, but enough to make a new big release.
- Add `only_diff` docs.
- Link CLI docs with those from configuration.
- Add link on `copier --help` to the docs.
- Include `copier --help-all` in the online docs.
Mkdocs uses `python-markdown`, and [they say](https://python-markdown.github.io/#differences):
> The syntax rules clearly state that when a list item consists of multiple paragraphs, “each subsequent paragraph in a list item must be indented by either 4 spaces or one tab” (emphasis added). However, many implementations do not enforce this rule and allow less than 4 spaces of indentation. The implementers of Python-Markdown consider it a bug to not enforce this rule.
As we were using 2 spaces for markdown files (which looks better in source code), some indented lists were not displaying properly in the docs page.
Thus I change the setting to 4 spaces. Prettier will now enforce them, and mkdocs will display things properly.
- Prepare for a new release.
- Add configuring page, with more explicit docs and examples for each option.
- Remove configuration stuff from creation page.
- Comparisons are ugly, so remove them from the index page.