Skip to content

ls: Improve the access to metadata of the files#5660

Merged
cakebaker merged 12 commits intouutils:mainfrom
sylvestre:stat-free-color
Dec 25, 2023
Merged

ls: Improve the access to metadata of the files#5660
cakebaker merged 12 commits intouutils:mainfrom
sylvestre:stat-free-color

Conversation

@sylvestre
Copy link
Contributor

Should fix tests/ls/stat-free-color.sh

@sylvestre
Copy link
Contributor Author

Do not merge. I need to simplify the color_name function

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/ls/stat-free-color is no longer failing!

@sylvestre sylvestre marked this pull request as ready for review December 17, 2023 16:11
ls_colors: &LsColors,
style_manager: &mut StyleManager,
out: &mut BufWriter<Stdout>,
check_for_deref: bool,
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

wahou, well spotted, bravo :)

@uutils uutils deleted a comment from github-actions bot Dec 20, 2023
@uutils uutils deleted a comment from github-actions bot Dec 20, 2023
@uutils uutils deleted a comment from github-actions bot Dec 20, 2023
@cakebaker cakebaker merged commit 6475e6f into uutils:main Dec 25, 2023
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