Skip to content

Conversation

@sylvestre
Copy link
Contributor

No description provided.

@sylvestre
Copy link
Contributor Author

based on this PR: #8626

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/chgrp/recurse. tests/chgrp/recurse is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)

@sylvestre sylvestre force-pushed the traversal7 branch 2 times, most recently from 2bcba37 to 21b334e Compare September 13, 2025 16:03
@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/tee (passes in this run but fails in the 'main' branch)

@sylvestre sylvestre marked this pull request as ready for review September 14, 2025 06:14
@sylvestre sylvestre requested a review from cakebaker September 14, 2025 06:15
let entry_path = dir_path.join(&entry_name);

// Get metadata for the entry
let follow = self.traverse_symlinks == TraverseSymlinks::All;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this correct? What about TraverseSymlinks::First?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

why do you think otherwise ? :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Because in walk_dir_with_context you use the following approach to determine whether to follow symlinks:

let should_follow_symlink = match self.traverse_symlinks {
    TraverseSymlinks::All => true,
    TraverseSymlinks::First => is_command_line_arg, // Only follow symlinks that are command line args
    TraverseSymlinks::None => false,
};

Copy link
Contributor

@cakebaker cakebaker left a comment

Choose a reason for hiding this comment

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

Done :)

@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails in the 'main' branch)

@codspeed-hq
Copy link

codspeed-hq bot commented Sep 21, 2025

CodSpeed Performance Report

Merging #8632 will create unknown performance changes

Comparing sylvestre:traversal7 (a00d7d7) with main (542e476)

Summary

⚠️ No benchmarks were detected in both the base of the PR and the PR.\

@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

Comment on lines 500 to 504
let should_follow_symlink = match self.traverse_symlinks {
TraverseSymlinks::All => true,
TraverseSymlinks::First => false, // Only follow symlinks that are command line args
TraverseSymlinks::None => false,
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Hm, I'm still struggling with this snippet. If line 502 is correct, then your previous approach with if is cleaner. Anyway, in both cases you can define should_follow_symlink outside of the for loop as its value doesn't depend on entry_name.

@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/misc/stdbuf (fails in this run but passes in the 'main' branch)

@cakebaker cakebaker merged commit 4a92c9b into uutils:main Sep 23, 2025
97 checks passed
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.

3 participants