a few minor changes

* minor typos
  * perltidy on Tsh
  * a minor optimisation to "do" in gl-conf
  * remove inapplicable caveat in fork command
This commit is contained in:
Sitaram Chamarty 2012-11-22 20:22:35 +05:30
parent b6d6260dbb
commit 2741fadc9d
4 changed files with 10 additions and 9 deletions

View file

@ -219,7 +219,7 @@ ACCESS RULES
GROUPS GROUPS
------ ------
Gitolite allows you to groups users or repos for convenience. Here's an Gitolite allows you to group users or repos for convenience. Here's an
example that creates two groups of users: example that creates two groups of users:
@staff = alice bob carol @staff = alice bob carol

View file

@ -10,10 +10,6 @@
# traffic but because it uses git clone's "-l" option to share the object # traffic but because it uses git clone's "-l" option to share the object
# store also, so it is likely to be almost instantaneous, regardless of how # store also, so it is likely to be almost instantaneous, regardless of how
# big the repo actually is. # big the repo actually is.
#
# The only caveat is that the repo you cloned *from* must not later become
# unavailable in any way. If you cannot be sure of this, take the scenic
# route (clone repo1, push to repo2).
die() { echo "$@" >&2; exit 1; } die() { echo "$@" >&2; exit 1; }
usage() { perl -lne 'print substr($_, 2) if /^# Usage/../^$/' < $0; exit 1; } usage() { perl -lne 'print substr($_, 2) if /^# Usage/../^$/' < $0; exit 1; }

View file

@ -248,7 +248,7 @@ sub load_1 {
if ( -f "gl-conf" ) { if ( -f "gl-conf" ) {
_warn "split conf not set, gl-conf present for '$repo'" if not $split_conf{$repo}; _warn "split conf not set, gl-conf present for '$repo'" if not $split_conf{$repo};
my $cc = "gl-conf"; my $cc = "./gl-conf";
_die "parse '$cc' failed: " . ( $! or $@ ) unless do $cc; _die "parse '$cc' failed: " . ( $! or $@ ) unless do $cc;
$last_repo = $repo; $last_repo = $repo;

View file

@ -261,7 +261,12 @@ sub rc_lines {
$cmd = shift @cmds; $cmd = shift @cmds;
# is the current command a "testing" command? # is the current command a "testing" command?
my $testing_cmd = ( $cmd =~ m(^ok(?:\s+or\s+(.*))?$) or $cmd =~ m(^!ok(?:\s+or\s+(.*))?$) or $cmd =~ m(^/(.*?)/(?:\s+or\s+(.*))?$) or $cmd =~ m(^!/(.*?)/(?:\s+or\s+(.*))?$) ); my $testing_cmd = (
$cmd =~ m(^ok(?:\s+or\s+(.*))?$)
or $cmd =~ m(^!ok(?:\s+or\s+(.*))?$)
or $cmd =~ m(^/(.*?)/(?:\s+or\s+(.*))?$)
or $cmd =~ m(^!/(.*?)/(?:\s+or\s+(.*))?$)
);
# warn if the previous command failed but rc is not being checked # warn if the previous command failed but rc is not being checked
if ( $rc and not $testing_cmd ) { if ( $rc and not $testing_cmd ) {
@ -474,7 +479,7 @@ sub fail {
sub cmp { sub cmp {
# compare input string with second input string or text() # compare input string with second input string or text()
my $in = shift; my $in = shift;
my $text = ( @_ ? +shift : text() ); my $text = ( @_ ? +shift : text() );
if ( $text eq $in ) { if ( $text eq $in ) {
@ -583,7 +588,7 @@ sub dummy_commits {
test_tick(); test_tick();
next; next;
} }
my $ts = ( $tick ? gmtime($tick+19800) : gmtime() ); my $ts = ( $tick ? gmtime( $tick + 19800 ) : gmtime() );
_sh("echo $f at $ts >> $f && git add $f && git commit -m '$f at $ts'"); _sh("echo $f at $ts >> $f && git add $f && git commit -m '$f at $ts'");
} }
} }