Skip to content

Commit 07b2169

Browse files
chore: remove trust now that HEAD does not require trust. (#276)
1 parent 92dc82c commit 07b2169

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

docs/tutorials/adopt-existing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ copier copy https://github.com/DiamondLightSource/python-copier-template.git --t
2222
git diff
2323
# Examine the changes, put back anything you want to keep
2424
git commit -m "Adopt python-copier-template 1.0.0"
25-
copier update /path/to/existing-project
25+
copier update /path/to/existing-project --trust
2626
git diff
2727
# Examine the changes, resolve any merge conflicts
2828
git commit -m "Update to python-copier-template x.x.x"

tests/test_example.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
TOP = Path(__file__).absolute().parent.parent
1111

1212

13-
def copy_project(project_path: Path, trust: bool = False, **kwargs):
13+
def copy_project(project_path: Path, **kwargs):
1414
with open(TOP / "example-answers.yml") as f:
1515
answers = yaml.safe_load(f)
1616
answers.update(kwargs)
@@ -20,7 +20,6 @@ def copy_project(project_path: Path, trust: bool = False, **kwargs):
2020
dst_path=project_path,
2121
data=answers,
2222
vcs_ref="HEAD",
23-
unsafe=trust,
2423
)
2524
run_pipe("git add .", cwd=str(project_path))
2625

@@ -160,7 +159,7 @@ def test_example_repo_updates(tmp_path: Path):
160159
"https://github.com/DiamondLightSource/python-copier-template-example.git"
161160
)
162161
example_path = tmp_path / "example"
163-
copy_project(generated_path, trust=True)
162+
copy_project(generated_path)
164163
run_pipe(f"git clone {example_url} {example_path}")
165164
with open(example_path / ".copier-answers.yml") as f:
166165
d = yaml.safe_load(f)
@@ -171,7 +170,7 @@ def test_example_repo_updates(tmp_path: Path):
171170
run("git config user.email 'you@example.com'")
172171
run("git config user.name 'Your Name'")
173172
run("git commit -am 'Update src'")
174-
run(f"copier update --trust --vcs-ref=HEAD --data-file {TOP}/example-answers.yml")
173+
run(f"copier update --vcs-ref=HEAD --data-file {TOP}/example-answers.yml")
175174
output = run(
176175
# Git directory expected to be different
177176
"diff -ur --exclude=.git "

0 commit comments

Comments
 (0)