From 9275f19a263d8386c4e29efc28803e3f8ff67a44 Mon Sep 17 00:00:00 2001 From: David Perl Date: Mon, 12 May 2025 09:52:42 +0200 Subject: [PATCH] feat: ask whether to make commit --- copier.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/copier.yml b/copier.yml index 11b461a..b0206fd 100644 --- a/copier.yml +++ b/copier.yml @@ -28,6 +28,11 @@ project_name: type: str help: What is your project name? +make_commit: + type: bool + help: would you like to automatically stage and commit the changes? + default: true + widget_plugins_input: # Defines the list of plugin widgets, following: # - name: widget name in snake case @@ -83,8 +88,12 @@ _tasks: {% endfor %} {% endif %} - > + {% if make_commit %} {% if _copier_operation == 'copy' %} git add -A; git commit -a -m 'Init repo {{ project_name }} at template version {{ _commit }}' {% else %} git add -A; git commit -a -m 'Update repo with template version {{ _commit }}' {% endif %} + {% else %} + echo "Autocommit disabled, leaving repo dirty" + {% endif %} \ No newline at end of file