summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xrvi5
1 files changed, 4 insertions, 1 deletions
diff --git a/rvi b/rvi
index 53ab1da..4b4e72d 100755
--- a/rvi
+++ b/rvi
@@ -56,6 +56,7 @@ if ! [ -e "$1,v" ] && ! [ -e "$DN/RCS/$BN,v" ] ; then
fi
owner="`stat -c "%u:%g" "$1"`"
+group=$(stat -c '%g' "$1")
rcsdiff -u "$1"
if [ $? -ne 0 ] ; then
echo
@@ -74,7 +75,9 @@ if [ $? -ne 0 ] ; then
exit 1
fi
if [ "$(id -u)" = "0" ]; then
- chown "$owner" "$1"
+ chown "$owner" "$1"
+elif ! chgrp "$group" "$1"; then
+ echo >&2 "Warning: group ownership was $group, but this could not be restored."
fi
$editor "$1"
ci -u "$1"