8000 MNT: Overwrite file instead of deleting/writing it by DimitriPapadopoulos · Pull Request #353 · python-versioneer/python-versioneer · GitHub
[go: up one dir, main page]

Skip to content

MNT: Overwrite file instead of deleting/writing it #353

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

Merged
merged 1 commit into from
Dec 17, 2022

Conversation

DimitriPapadopoulos
Copy link
Contributor

Why create a new inode? Overwrite the contents of the existing inode.

@DimitriPapadopoulos DimitriPapadopoulos changed the title Overwrite file instead of deleting/recreating it Overwrite file instead of deleting/writing it Dec 17, 2022
@DimitriPapadopoulos DimitriPapadopoulos force-pushed the unlink branch 2 times, most recently from 5a09e63 to 3ffc5f5 Compare December 17, 2022 10:34
@DimitriPapadopoulos DimitriPapadopoulos changed the title Overwrite file instead of deleting/writing it MNT: Overwrite file instead of deleting/writing it Dec 17, 2022
Why create a new inode? Overwrite the contents of the existing inode.
@effigies
Copy link
Contributor

Was curious why it was this way. Seems like it was added on the second commit (2d60f55).

The main thing I can think of would be that if there's a chance the file was linked/symlinked, you could end up with a file modified at a distance. Since this is happening in the build directory, a copy is most likely, so that danger seems low.

@effigies effigies merged commit c56c3e8 into python-versioneer:master Dec 17, 2022
@DimitriPapadopoulos DimitriPapadopoulos deleted the unlink branch December 18, 2022 07:58
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
0