rustcoreutils / posixutils-rs

Core POSIX command line utilities in safe Rust
MIT License
329 stars 25 forks source link

Finish chgrp #374

Closed JRF63 closed 1 week ago

JRF63 commented 1 week ago

This PR finalizes the chgrp implementation and includes tests for it.

I found an undocumented quirk regarding passing a missing group argument to chgrp that's neither mentioned in the man page nor in the specification. Supposedly,

chgrp '' a

Should change a's ctime but shouldn't modify its group. I think the behavior was taken from chown based on its man page. I added it in because it seems like a common pattern seeing that it's even on Rust's chown.