Stefan Sperling <s...@elego.de> writes:

> That said, a one-line pre-commit hook script could check its UID and
> disallow the commit if it is invoked as root:
> if [ "`whoami`" == "root" ]; then exit 1; fi

The start-commit is probably better than the pre-commit as there is no
point allowing the transaction to start.

The start-commit gets a username as $2 and the script could use that,
but invoking whoami is probably better for the purpose of blocking root.
For file:// access whoami and $2 will usually be the same but they could
be different if --username is used.

-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*

Reply via email to