aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSitaram Chamarty <sitaram@atc.tcs.com>2012-02-27 20:26:35 +0530
committerSitaram Chamarty <sitaram@atc.tcs.com>2012-02-29 06:45:31 +0530
commit23b3d540789683d038d4d769deec555fe2378c0b (patch)
treeda7a44ddd16b2fef0302eec338d089aa8fd9b3a9
parentgl-admin-push learns '-h' (diff)
downloadgitolite-gentoo-23b3d540789683d038d4d769deec555fe2378c0b.tar.gz
gitolite-gentoo-23b3d540789683d038d4d769deec555fe2378c0b.tar.bz2
gitolite-gentoo-23b3d540789683d038d4d769deec555fe2378c0b.zip
gl-dryrun learns '-h', plus a couple of other fixes
-rwxr-xr-xsrc/gl-dryrun8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gl-dryrun b/src/gl-dryrun
index 2ebd198..5943433 100755
--- a/src/gl-dryrun
+++ b/src/gl-dryrun
@@ -11,7 +11,7 @@ cat <<EOFU
This is a quick hack. It is not "production quality". Resist the temptation
to turn this into an update.secondary hook and put it on the server. I WILL
NOT BE RESPONSIBLE FOR ANY PROBLEMS IF YOU DO THAT. (Even more so if you use
-'git checkout $3' *without* setting GIT_INDEX_FILE to something temporary, and
+'git checkout' *without* setting GIT_INDEX_FILE to something temporary, and
eventually realise that *deleted* files don't stay deleted...! And if you
didn't understand that, all the more reason not to do it).
@@ -35,6 +35,8 @@ EOFU
exit 1;
}
+[ "$1" = "-h" ] && usage
+
[ -n "$1" ] || die "need an admin username"
admin="$1"; shift
@@ -69,7 +71,7 @@ $GL_CONF_COMPILED="$GL_ADMINDIR/conf/gitolite.conf-compiled.pm";
$GL_WILDREPOS = 1;
$PROJECTS_LIST = $ENV{PWD} . "/projects.list";
$REPO_UMASK = 0077;
-$GL_BIG_CONFIG = 0;
+$GL_BIG_CONFIG = 1;
$GL_NO_DAEMON_NO_GITWEB = 1;
$GIT_PATH="";
$GL_GITCONFIG_KEYS = ".*";
@@ -86,7 +88,7 @@ EOF
# now compile it
echo compiling...
-$GL_BINDIR/gl-compile-conf
+$GL_BINDIR/gl-compile-conf || die "compile failed; aborting rest of run"
echo
echo "checking if $admin has push rights..."