Skip to content

Conversation

sisp
Copy link
Member

@sisp sisp commented Oct 17, 2025

I've fixed a bug in the update algorithm where templated skip-if-exists patterns weren't rendered before passing them to the git apply --exclude <pattern> command, so the exclude patterns were incorrect.

Kudos to @lkubb for discovering this bug in https://github.com/orgs/copier-org/discussions/2345#discussioncomment-14639768! 🙏

Without the fix, the added test fails with the following error:

>       assert (dst / "skip-if-exists.txt").read_text() == "baz"
E       AssertionError: assert '<<<<<<< before updating\nbaz\n=======\nbar\n>>>>>>> after updating\n' == 'baz'
E         
E         + <<<<<<< before updating
E         - baz
E         + baz
E         ?    +
E         + =======
E         + bar
E         + >>>>>>> after updating

@codecov
Copy link

codecov bot commented Oct 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.24%. Comparing base (74f2f59) to head (1370817).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2364   +/-   ##
=======================================
  Coverage   97.23%   97.24%           
=======================================
  Files          55       55           
  Lines        6195     6213   +18     
=======================================
+ Hits         6024     6042   +18     
  Misses        171      171           
Flag Coverage Δ
unittests 97.24% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sisp sisp merged commit 40c1839 into master Oct 17, 2025
21 checks passed
@sisp sisp deleted the fix/update-with-templated-skip-if-exists branch October 17, 2025 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant