gl-reflog adc gains 'usage', loses some crappy warnings

(actually these warnings can come in many other situations; I just
noticed them when testing this adc)
This commit is contained in:
Sitaram Chamarty 2010-10-28 19:34:46 +05:30
parent 5b3dcb3757
commit 6386d8ca2f
2 changed files with 15 additions and 7 deletions

View file

@ -13,13 +13,20 @@ use warnings;
# - heavily dependent on the gitolite log file format (duh!) # - heavily dependent on the gitolite log file format (duh!)
# - cannot recover if some other commits were made after the force push # - cannot recover if some other commits were made after the force push
# USAGE sub usage {
# ssh git@server gl-reflog show r1 refs/heads/b1 print STDERR <<'EOF';
# # shows last 10 updates to branch b1 in repo r1 USAGE
# ssh git@server gl-reflog show r1 refs/heads/b1 20 ssh git@server gl-reflog show r1 refs/heads/b1
# # shows last 20 entries... # shows last 10 updates to branch b1 in repo r1
# ssh git@server gl-reflog recover r1 refs/heads/b1 ssh git@server gl-reflog show r1 refs/heads/b1 20
# # recovers the last update to b1 in r1 if it was a "+" # shows last 20 entries...
ssh git@server gl-reflog recover r1 refs/heads/b1
# recovers the last update to b1 in r1 if it was a "+"
EOF
exit 1;
}
usage unless (@ARGV >= 3);
# NOTES # NOTES
# - the verb "recover" is used because this is expected to be used most often # - the verb "recover" is used because this is expected to be used most often

View file

@ -320,6 +320,7 @@ sub new_repo
# pull in basic group info # pull in basic group info
unless ($cache_filled) { unless ($cache_filled) {
local(%repos, %groups); local(%repos, %groups);
local $^W = 0;
# read group info from compiled config. At the time we're called # read group info from compiled config. At the time we're called
# this info has not yet been pulled in by the rest of the code, so # this info has not yet been pulled in by the rest of the code, so
# we need to do this specially here. However, the info we're # we need to do this specially here. However, the info we're