diff options
author | Thomas Gerbet <thomas.gerbet@enalean.com> | 2019-02-25 14:45:27 +0100 |
---|---|---|
committer | Sitaram Chamarty <sitaramc@gmail.com> | 2019-03-03 15:57:51 +0530 |
commit | 657ac9f89fad87c2790982029386bd720417e26f (patch) | |
tree | a881df01df9e7b69098bb529f39a8dde5b610343 /src | |
parent | minor change to test due to change in git 2.18+ (diff) | |
download | gitolite-gentoo-657ac9f89fad87c2790982029386bd720417e26f.tar.gz gitolite-gentoo-657ac9f89fad87c2790982029386bd720417e26f.tar.bz2 gitolite-gentoo-657ac9f89fad87c2790982029386bd720417e26f.zip |
VREF/MAX_NEWBIN_SIZE does not handle deletion
If a reference is deleted in a repository where this virtual ref is
active, the script is not capable of handling it correctly:
remote: fatal: bad object 0000000000000000000000000000000000000000
remote: error: unable to find 0000000000000000000000000000000000000000
remote: fatal: Not a valid object name
0000000000000000000000000000000000000000
This patch fixes the issue.
[commit message and patch modified slightly by Sitaram]
Diffstat (limited to 'src')
-rwxr-xr-x | src/VREF/MAX_NEWBIN_SIZE | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/VREF/MAX_NEWBIN_SIZE b/src/VREF/MAX_NEWBIN_SIZE index 84a9efa..99d51d3 100755 --- a/src/VREF/MAX_NEWBIN_SIZE +++ b/src/VREF/MAX_NEWBIN_SIZE @@ -21,6 +21,8 @@ die "not meant to be run manually" unless $ARGV[7]; my ( $newsha, $oldtree, $newtree, $refex, $max ) = @ARGV[ 2, 3, 4, 6, 7 ]; +exit 0 if $newsha eq '0000000000000000000000000000000000000000'; + # / (.*) +\| Bin 0 -> (\d+) bytes/ chomp( my $author_email = `git log --format=%ae -1 $newsha` ); |