Repository navigation
fix(ls): preserve permission info as octal when -l/-la is passed - #1675
Conversation
📊 Automated PR Analysis
SummaryFixes the Review Checklist
Linked issues: #1672 Analyzed automatically by wshm · This is an automated analysis, not a human review. |
KuSh
left a comment
There was a problem hiding this comment.
Thanks for the PR, that's a great addition but it needs some minor changes first!
KuSh
left a comment
There was a problem hiding this comment.
Thanks for the PR, that's a great addition but it needs some minor changes first!
Addresses PR rtk-ai#1675 review: instead of ignoring the perms field in existing parse_ls_line tests, assert its value so regressions in permission parsing are caught.
KuSh
left a comment
There was a problem hiding this comment.
Hi @ryana-0154, you'll need to resolve conflicts before we can merge that one, otherwise LGTM!
Hi - there doesn't seem to be any merge conflicts to develop - can you confirm? |
Let me recheck, I did have one when I tried earlier |
|
@ryana-0154 there's a conflict, please rebase: ❯ git rebase upstream/develop
Auto-merging src/cmds/system/ls.rs
CONFLICT (content): Merge conflict in src/cmds/system/ls.rs
error: could not apply 39dee40... fix(ls): preserve permission info as octal when -l/-la is passed
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Could not apply 39dee40... # fix(ls): preserve permission info as octal when -l/-la is passed |
|
You seem to have rebased on the wrong branch (certainly master) you have to fix that. 57 files changed all over the place is too much for the subject 😉 |
Closes rtk-ai#1672 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
e0cb485 to
6c4dfc7
Compare
duh... what an idiot :D Fixed! |
rtk 0.42.3 Created-by: HarmonybrewBot Commit-by: HarmonybrewBot Merged-by: HarmonybrewBot Description: Created by `brew bump` --- Created with `brew bump-formula-pr`.<details> <summary>release notes</summary> <pre>## [0.42.3](rtk-ai/rtk@v0.42.2...v0.42.3) (2026-06-05) ### Feats - feat(copilot): CLI native integration #2101 ### Fix - fix(docs): replace remaining MIT license references with Apache 2.0 [#2084](rtk-ai/rtk#2084) - fix: prevent crashes when output is piped rtk-ai/rtk#1048 close rtk-ai/rtk#1004 - fix(grep): parse single-file output containing colons rtk-ai/rtk#1554; close rtk-ai/rtk#1436. - fix(ls): preserve permission info as octal when -l/-la is passed rtk-ai/rtk#1675 - fix(cicd): MIT to Apache 2.0 [#2092](rtk-ai/rtk#2092) - fix(pkg): rtk is Apache 2.0 and no MIT [#2082](rtk-ai/rtk#2082) - fix(hook): collapse bash line continuations before matching #1572 close Hook matcher: leading backslash-newline defeats command rewrite #1564 - fix(gh,glab): don't pre-reject view/checks/run subcommands missing the id rtk-ai/rtk#2123 - fix(git): fix panic on multibyte chars in commit output rtk-ai/rtk#1266 ### Other - docs(readme): add Portuguese translation #2128 - doc(init): fix documentation inconsistencies arount rtk init rtk-ai/rtk#2173 - fix(provider): sanatize more chars when encoding claude code project pathes https://github.com/rtk-ai/rtk/pull/2172</pre> <p>View the full release notes at <a href="https://github.com/rtk-ai/rtk/releases/tag/v0.42.3">https://github.com/rtk-ai/rtk/releases/tag/v0.42.3</a>.</p> </details> <hr> See merge request: Harmonybrew/homebrew-core!10665
Summary
rtk ls -lais equivalent tortk ls, which leads to the loss of some info. #1672 —rtk ls -lawas producing output identical tortk lsbecause the filter stripped permission/ownership entirely.-l(or-la), each entry is now prefixed with octal perms (e.g.644,755), matching the proposal in the issue.4755,1777,7777).rtk ls(no-l) is unchanged.Example
Before:
.DS_Store 6.0K
init.py 984B
After (
rtk ls -la):644 .DS_Store 6.0K
644 init.py 984B
Test plan
cargo fmt --all -- --checkcargo clippy --all-targets— 0 errors (pre-existing warnings unchanged)cargo test --all— 1692 passed, 6 ignoredperms_to_octal(common perms, setuid/setgid/sticky, garbage input) and for long vs. short output formatting