Switch ref-change to take username instead of uid
commit48408744548c0e054927141f3c43e537d7cae331
authorKyle J. McKay <mackyle@gmail.com>
Sat, 29 Jun 2013 23:55:19 +0000 (29 16:55 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Sat, 29 Jun 2013 23:55:19 +0000 (29 16:55 -0700)
tree4458ffa8afc93a7dc707ee6169229b59902110d4
parenta63732aa1b3f92c17c7b19743abaa3b5ff1aca88
Switch ref-change to take username instead of uid

The $UID variable is not available in the standard
/bin/sh.  Even though jailsetup.sh copies /bin/sh
into the jail, reop.or.cz was running with /bin/bash
copied into the jail as bin/sh.

This allowed repo.or.cz to work correctly with a
post-receive hook that passes on $UID, but not new
installations that depend on jailsetup.sh to build
the chroot bin directory.

Since $LOGNAME is readily available in the chroot
bin/sh shell, it is passed to ref-change instead
of trying to convert to a uid.

When post-receive is called from outside the chroot
jail (currently only possible with https push), the
name of the push user will be passed instead of
$LOGNAME.

Where jobd/update.sh used to pass "-1" to indicate the
project, it now passes the project name between a pair
of '%' characters.  Since '%' is not allowed in user
names there can be no confusion in taskd.pl.
hooks/post-receive
jobd/update.sh
taskd/taskd.pl