Skip to content
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

Fix fs event deduplication for vi #2536

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

Bravo555
Copy link
Contributor

@Bravo555 Bravo555 commented Dec 19, 2023

Proposed changes

vi doesn't use a temporary file, but just modifies the file directly. In vim, modification was handled by changing Access(Close(Write)) event to Modify. Vi created both Modify and then Access(Close(Write)), which were duplicates. The missed case was added.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (general improvements like code refactoring that doesn't explicitly fix a bug or add any new functionality)
  • Documentation Update (if none of the other choices apply)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Paste Link to the issue

#2451

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA (in all commits with git commit -s)
  • I ran cargo fmt as mentioned in CODING_GUIDELINES
  • I used cargo clippy as mentioned in CODING_GUIDELINES
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

vi doesn't use a temporary file, but just modifies the file directly. In
vim, modification was handled by changing Access(Close(Write)) event to
Modify. Vi created both Modify and then Access(Close(Write)), which were
duplicates. The missed case was added.

Signed-off-by: Marcel Guzik <marcel.guzik@inetum.com>
Copy link

codecov bot commented Dec 19, 2023

Codecov Report

Merging #2536 (c88328d) into main (19c39b7) will decrease coverage by 0.1%.
The diff coverage is 100.0%.

Additional details and impacted files
Files Coverage Δ
crates/common/tedge_utils/src/notify.rs 93.3% <100.0%> (+<0.1%) ⬆️

... and 3 files with indirect coverage changes

Copy link
Contributor

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
375 0 3 375 100 57m38.368s

Copy link
Contributor

@didier-wenzek didier-wenzek left a comment

Choose a reason for hiding this comment

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

Approved

@Bravo555 Bravo555 merged commit 460f3eb into thin-edge:main Dec 19, 2023
18 checks passed
@Bravo555 Bravo555 deleted the fix/2451/log-upload-duplicates branch December 19, 2023 13:33
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.

None yet

2 participants