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

feat: choose backup strategy #12985

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

aster-void
Copy link
Contributor

@aster-void aster-void commented Feb 28, 2025

what does this PR allow?

it allows choosing backup strategy from these three:

  • move original to backup, create a new file, then move the backup back if it fails / use COPY strategy if the file is hard-link (current behaviour, will be the default)
  • copy original to backup, write to the original, then copy the backup back if it fails
  • directly write to the original file

why?

some tools such as Vite and Tinymist fails to detect changes because of helix's current backup behaviour. As a workaround, I want to change how helix creates backup.

other things

lmk if there's better name for this, because I'm bad at naming things :)

@aster-void aster-void changed the title feat: choose writing strategy feat: choose backup strategy Feb 28, 2025
@TornaxO7
Copy link
Contributor

Is this related to #11374 somehow?

@aster-void
Copy link
Contributor Author

aster-void commented Feb 28, 2025

@TornaxO7 Probably yes.
I just needed a quick patch to not stop my vite watch every other :w's.

I'm willing to change the config variable to something that makes more sense after that PR

@aster-void aster-void force-pushed the feat/select-write-strategy branch from 3136adc to da6d182 Compare March 1, 2025 03:56
@aster-void aster-void force-pushed the feat/select-write-strategy branch from da6d182 to 8b0a422 Compare March 1, 2025 04:00
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.

2 participants