Skip to content

Merge: Write empty file with unused messages#112

Merged
janezd merged 1 commit intomasterfrom
empty-unused
Dec 29, 2025
Merged

Merge: Write empty file with unused messages#112
janezd merged 1 commit intomasterfrom
empty-unused

Conversation

@janezd
Copy link
Owner

@janezd janezd commented Dec 29, 2025

Resolves #108.

When -u is given to merge, an empty file is written if there are not unused messages.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements functionality to write an empty unused messages file when the -u option is provided to the merge command but no unused messages are found. This resolves issue #108 by ensuring that if an unused file previously existed, it will be cleared when there are no more unused messages, rather than leaving the old content in place.

Key Changes

  • Modified the merge command logic to always write to the unused file when -u is specified, creating an empty file when no unused messages exist
  • Added a test case to verify that an existing unused file is properly cleared when there are no unused messages

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
trubar/main.py Updated merge command to create an empty unused file when -u is specified but no unused messages exist
trubar/tests/shell_tests/merge/test.sh Added test case to verify empty unused file is written when an existing unused file has content but no unused messages remain

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@janezd janezd merged commit 39b06c9 into master Dec 29, 2025
6 checks passed
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.

Write empty files with unused messages

2 participants