Repository navigation
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
e5811cc to
fa6dc56
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
fa6dc56 to
790e4d1
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
790e4d1 to
5896c2b
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
5896c2b to
d273dd6
Compare
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
5 open issues
With--ignore-file-name-case,name_key()allocates a newVec<u8>each time it’s called. In… · New With--ignore-file-name-case,name_key()allocates a newVec<u8>each time it’s called. In… · New Theread_dir(dir).into_iter().flatten().flatten()pattern is hard to read and it also silently… · Newoption_argumenttreats any non-empty suffix after the short option as the attached value. This… · New The doc comment says this returnsnamein lowercase, but for non-UTF-8OsStrit only performs… · New
Review effort: Lite
| // -S only applies to the operands, not to their subdirectories. | ||
| if let (true, Some(start)) = (self.ancestors.is_empty(), &self.params.starting_file) { | ||
| let start = self.name_key(start).into_owned(); | ||
| from_names.retain(|name| *self.name_key(name) >= *start); | ||
| to_names.retain(|name| *self.name_key(name) >= *start); | ||
| } | ||
| let ancestors_len = self.ancestors.len(); | ||
| self.ancestors.extend(canonical_dirs); | ||
|
|
||
| let entries = pair_entries(&from_names, &to_names, |from, to| { | ||
| from.as_encoded_bytes().cmp(to.as_encoded_bytes()) | ||
| self.name_key(from).cmp(&self.name_key(to)) | ||
| }); |
| if self.params.ignore_file_name_case { | ||
| Cow::Owned(fold_file_name_case(name)) | ||
| } else { | ||
| Cow::Borrowed(name.as_encoded_bytes()) |
| fn directory_entry(dir: &Path, name: &OsStr, params: &Params) -> OsString { | ||
| if params.ignore_file_name_case && !dir.join(name).exists() { | ||
| let wanted = fold_file_name_case(name); | ||
| let entries = std::fs::read_dir(dir).into_iter().flatten().flatten(); | ||
| if let Some(entry) = entries | ||
| .map(|entry| entry.file_name()) | ||
| .find(|entry| fold_file_name_case(entry) == wanted) | ||
| { | ||
| return entry; | ||
| } | ||
| } | ||
| name.to_os_string() | ||
| } |
| param | ||
| .strip_prefix(long) | ||
| .and_then(|rest| rest.strip_prefix('=')) | ||
| .or_else(|| param.strip_prefix(short).filter(|value| !value.is_empty())) |
| /// Returns `name` in lowercase, to match file names ignoring case. | ||
| pub fn fold_file_name_case(name: &OsStr) -> Vec<u8> { | ||
| match name.to_str() { | ||
| Some(name) => name.to_lowercase().into_bytes(), | ||
| None => name.as_encoded_bytes().to_ascii_lowercase(), | ||
| } | ||
| } |
|
GNU diffutils testsuite comparison: |


Stack created with GitHub Stacks CLI • Give Feedback 💬