Skip to content

Conversation

@EliahKagan
Copy link
Member

Fixes #1817

This expands and slightly corrects the gix_index::entry::from_fs documentation:

  • To be more precise about the expectation of where the metadata come from (it needn't specifically be the symlink_metadata function, and it is sometimes even an fstat-like function rather than an lstat-like function, though not stat).
  • To mention that default values are used for unavailable data.
  • To mention that truncation is sometimes performed on some fields.

Comments are also updated regarding some cases of truncation: why casting down to 32-bit should be okay for st_dev and st_ino. The st_dev case is discussed in #1817. I think this applies also to st_ino, but if that is less certain then further changes may be needed here.

This expands and slightly corrects the `gix_index::entry::from_fs`
documentation:

- To be more precise about the expectation of where the metadata
  come from (it needn't specifically be the `symlink_metadata`
  function, and it is sometimes even an `fstat`-like function
  rather than an `lstat`-like function, though not `stat`).

- To mention that default values are used for unavailable data.

- To mention that truncation is sometimes performed on some fields.

Comments are also updated regarding some cases of truncation: why
casting down to 32-bit should be okay for `st_dev` and `st_ino`
(see GitoxideLabs#1817).
@EliahKagan EliahKagan changed the title doc: Expand from_fs doc Expand from_fs doc Jan 30, 2025
Copy link
Member

@Byron Byron left a comment

Choose a reason for hiding this comment

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

Thanks a lot, much appreciated!

@Byron Byron merged commit 14d6b8d into GitoxideLabs:main Jan 30, 2025
21 checks passed
@EliahKagan EliahKagan deleted the from-fs-doc branch January 30, 2025 07:09
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.

stat.ino() is assumed to be small

2 participants