-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
ls: Improve the access to metadata of the files #5660
Conversation
Do not merge. I need to simplify the color_name function |
04c40a8
to
162afc0
Compare
GNU testsuite comparison:
|
70deb44
to
cdfb607
Compare
src/uu/ls/src/ls.rs
Outdated
ls_colors: &LsColors, | ||
style_manager: &mut StyleManager, | ||
out: &mut BufWriter<Stdout>, | ||
check_for_deref: bool, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check_for_deref
seems unnecessary to me because its value is linked to target_symlink
: it's true
if target_symlink
is Some(..)
, and false
, if target_symlink
is None
. And as color_name
is only called twice, it might make sense to split the function into two functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wahou, well spotted, bravo :)
…tat-free-color.sh
Co-authored-by: Daniel Hofstetter <[email protected]>
6032a94
to
c5217b3
Compare
Should fix tests/ls/stat-free-color.sh