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

Replace custom inode-based file comparison with os.SameFile. #36562

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Gofastasf
Copy link

@Gofastasf Gofastasf commented Feb 21, 2025

  • Remove inode.go, inode_freebsd.go, and inode_windows.go, eliminating platform-specific inode lookup logic.

  • Call os.Stat on dstPath to obtain os.FileInfo since os.SameFile requires FileInfo objects for comparison and not raw string.

  • Replace sameFile function with os.SameFile, simplifying file comparison logic.

  • This change is not user-facing.

@Gofastasf Gofastasf requested a review from a team as a code owner February 21, 2025 14:37
Copy link

hashicorp-cla-app bot commented Feb 21, 2025

CLA assistant check
All committers have signed the CLA.

This comment was marked as resolved.

Copy link
Member

@SarahFrench SarahFrench left a comment

Choose a reason for hiding this comment

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

👋🏻 Hi, thanks for opening a PR!

It looks like the CLA automation is having trouble due to the commit you pushed lacking any email information in the author info. Could you please re-create the commit so that there's an email included that's also linked to your GitHub account?

@Gofastasf Gofastasf force-pushed the refactor/remove-custom-inode-check branch from 297f44b to a6b6db8 Compare February 21, 2025 16:08
@Gofastasf
Copy link
Author

Hey Sarah that was a mistake. Recreated with email now.

@SarahFrench SarahFrench added the no-changelog-needed Add this to your PR if the change does not require a changelog entry label Feb 21, 2025
Remove inode.go, inode_freebsd.go, and inode_windows.go, eliminating platform-specific inode lookup logic.
Replace sameFile function with os.SameFile, simplifying file comparison logic.
@Gofastasf Gofastasf force-pushed the refactor/remove-custom-inode-check branch from 09756cd to 3afdc81 Compare February 22, 2025 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog-needed Add this to your PR if the change does not require a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants