-
-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Mark conflicted files as unmerged #1396
feat: Mark conflicted files as unmerged #1396
Conversation
b5c895d
to
09ee2dd
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1396 +/- ##
==========================================
+ Coverage 97.24% 97.30% +0.05%
==========================================
Files 48 48
Lines 4423 4520 +97
==========================================
+ Hits 4301 4398 +97
Misses 122 122
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Most of the feature test is boilerplate to generate conflict markers in a project. Maybe this boilerplate could be declared in a fixture instead, to allow reusing it. |
09ee2dd
to
0667373
Compare
I fixed the tests for the annoying operating system. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feature is very awesome!
IMHO, I'd rename a bit the last commit, to something like feat: conflicts on updates now appear as git merge conflicts, also on VSCode
. This is nicer for the changelog.
Also, I think you should add the git status check on the test.
0667373
to
85ee904
Compare
85ee904
to
6eaa71d
Compare
Commit message updated 🙂 |
@pawamoy Is there a way to detect conflicted files (after a copier update) within the git cli? |
Hey @bswck, I'm not sure to completely understand, but once you've updated your project with latest Copier, conflicted files will look like $ git status -sb
## main...origin/main
M .copier-answers.yml
M .github/ISSUE_TEMPLATE/bug_report.md
M .github/ISSUE_TEMPLATE/config.yml
M .github/ISSUE_TEMPLATE/feature_request.md
M CONTRIBUTING.md
M Makefile
M README.md
M config/ruff.toml
M docs/credits.md
M docs/css/mkdocstrings.css
UU duties.py
D mkdocs.insiders.yml
UU mkdocs.yml
UU pyproject.toml
UU scripts/gen_credits.py
M scripts/gen_ref_nav.py
M scripts/setup.sh
UU src/failprint/cli.py
UU tests/test_cli.py
?? config/git-changelog.toml
?? config/vscode/
?? src/failprint/debug.py You can also list them with $ git ls-files --stage | grep ' [123]\s'
100644 5a3413ed756d1c659c93f5051bad886131783967 1 duties.py
100644 5a3413ed756d1c659c93f5051bad886131783967 2 duties.py
100644 5a3413ed756d1c659c93f5051bad886131783967 3 duties.py
100644 0a4ac137f01fe9c32a2eb08b012d4b4db964fec0 1 mkdocs.yml
100644 0a4ac137f01fe9c32a2eb08b012d4b4db964fec0 2 mkdocs.yml
100644 0a4ac137f01fe9c32a2eb08b012d4b4db964fec0 3 mkdocs.yml
100644 02db61bd00b273bb14055842c5907fe26b7e7910 1 pyproject.toml
100644 02db61bd00b273bb14055842c5907fe26b7e7910 2 pyproject.toml
100644 02db61bd00b273bb14055842c5907fe26b7e7910 3 pyproject.toml
100644 459f293926397cddd6966fc80344a4e87a0d0024 1 scripts/gen_credits.py
100644 459f293926397cddd6966fc80344a4e87a0d0024 2 scripts/gen_credits.py
100644 459f293926397cddd6966fc80344a4e87a0d0024 3 scripts/gen_credits.py
100644 6fff4fbc7ecb63422e569182c5a7019930f8c983 1 src/failprint/cli.py
100644 6fff4fbc7ecb63422e569182c5a7019930f8c983 2 src/failprint/cli.py
100644 6fff4fbc7ecb63422e569182c5a7019930f8c983 3 src/failprint/cli.py
100644 307fbafef475bb4048c8a714acb042f8f100cf30 1 tests/test_cli.py
100644 307fbafef475bb4048c8a714acb042f8f100cf30 2 tests/test_cli.py
100644 307fbafef475bb4048c8a714acb042f8f100cf30 3 tests/test_cli.py |
@pawamoy Thanks! It didn't work for me as I was trying to check for conflicts after staging all the files. 🤦♂️ |
This PR contains 3 commits that should not be squashed:
git_init
functionI pushed the fix as part of this PR because it was useful to test the feature.