chown,chgrp: output the correct ownership in -v messages
commit6b282e7510ca8dcbb44f8402b52ba8c8b1d01b80
authorPádraig Brady <P@draigBrady.com>
Thu, 26 May 2011 10:15:11 +0000 (26 11:15 +0100)
committerPádraig Brady <P@draigBrady.com>
Fri, 27 May 2011 21:37:46 +0000 (27 22:37 +0100)
treeaaa9a4534f95864169598bcb9ec9fdfde1003639
parent8a26bccb467a3b22e5d894234c4b4a5c337294d4
chown,chgrp: output the correct ownership in -v messages

* src/chown_core.c (describe_change): Accept the ownership of
the original file and output that when not changing.
This is significant when --from is specified as then
the original and specified ownership may be different.
(user_group_str): A new helper function refactored from
describe_change().
(change_file_owner): Pass the original user and group
strings to describe_change().
* test/chown/basic: Add a test case.
* NEWS: Mention the fix.
NEWS
src/chown-core.c
tests/chown/basic