- there was a inconsistence between the inline and rej default. as it's inline I changed the value in the corrected section
- as users won't need the 2 options at once, I split the 2 hooks.
- specified that both repos can be used at once
Co-authored-by: Sigurd Spieckermann <2206639+sisp@users.noreply.github.com>
Users should be able to pass CLI data arguments and use a `--data-file` at the same time. Let's just take inspiration from the [helm values file](https://helm.sh/docs/chart_template_guide/values_files/) and give highest priority to data values passed at the command line.
BREAKING CHANGE: Changes the return code for unsafe template error from
2 to 4 to avoid return code collision with Plumbum's `SwitchError` type
errors which use return code 2.
Docs were a bit repetitive and unclear.
Targets https://github.com/copier-org/copier/issues/1170. It could even fix it?
Co-authored-by: Timothée Mazzucotelli <pawamoy@pm.me>
Co-authored-by: Sigurd Spieckermann <2206639+sisp@users.noreply.github.com>
I've disabled the use of unsafe features (Jinja extensions, migrations, and tasks) by default and added a new CLI switch `--UNSAFE` which enables them. Templates that don't use unsafe features are unaffected by this change. But Copier will raise an error for templates that do use unsafe features unless the `--UNSAFE` flag is passed.
I've not added an interactive prompt that asks for consent for using unsafe features because I think it's not clear how to distinguish between interactive prompting and raising an error when `--UNSAFE` is not passed. For this, I think Copier would need a switch that clearly states whether interactive or non-interactive mode is desired. Currently, `--defaults` implies this for questions.
Fixes https://github.com/copier-org/copier/issues/1137
BREAKING CHANGE: Copier raises an error when a template uses unsafe features unless the `--UNSAFE` switch is passed
Now that the inline mode is out of experimental, it turns out to provide a better default behavior than the good old rej mode. Mostly when context is increased to 3 lines or more.
BREAKING CHANGE: The default update conflict mode is now `inline` instead of `rej`.
BREAKING CHANGE: By default, updates now consider 3 lines of context instead of just 1.
This new command allows to reapply a template, keeping old answers but discarding subproject evolution.
It is useful when there are bugs replaying an old version of the template, or when the subproject has drifted too much from the template and you need to reset it.
BREAKING CHANGE: All CLI calls to Copier must now include the subcommand as the 1st argument. For example, `copier` must become now `copier update`; also `copier ./tpl ./dst` must become `copier copy ./tpl ./dst`.
BREAKING CHANGE: All flags must go after the subcommand now. For example, `copier -r HEAD update ./dst` must now become `copier update -r HEAD ./dst` or `copier update ./dst -r HEAD`.
BREAKING CHANGE: Automatic mode removed. Since now subcommands are required, the automatic mode is removed.
BREAKING CHANGE: Deprecated `copier.copy` function is removed. Use `copier.run_copy`, `copier.run_update` or `copier.run_recopy` explicitly as needed.
Fix https://github.com/copier-org/copier/issues/1081
Close https://github.com/copier-org/copier/issues/1082
Until today, the updatediff algorithm always used just 1 line of context when detecting conflicts. This was because:
- Solving conflicts wasn't very ergonomic with those `.rej` files around.
- More lines meant too many conflicts usually.
However, it made the diff detection less accurate.
With this change, we allow the users to configure that algorithm. Since they have now the `--context inline` option, more conflicts isn't so much of a problem.
@moduon MT-2638
Many folks are not very comfortable with nix yet, so let's document how they can use it in their pipelines with more widely-known tools such as Docker and Podman.
Fixes https://github.com/copier-org/copier/issues/457.
This was the intended and documented behavior, but at some point it got broken.
Well, now it's tested and it works.
Besides, there's a new FAQ to avoid further surprises.
Fixes https://github.com/copier-org/copier/issues/787
When questions didn't have a default answer, the interactive behavior was confusing.
Fixes https://github.com/copier-org/copier/issues/355.
BREAKING CHANGE: All default answers must be explicit now.