aboutsummaryrefslogtreecommitdiff
path: root/src/VREF
diff options
context:
space:
mode:
authorSitaram Chamarty <sitaram@atc.tcs.com>2012-06-23 08:53:37 +0530
committerSitaram Chamarty <sitaram@atc.tcs.com>2012-06-23 09:11:08 +0530
commit53543ee3e6a837dc3ecca3c990f7ab6bd7ee933b (patch)
tree05d73d8e0dbb133b9bce30dd2d28c77431e5a59b /src/VREF
parentFixed url decoding in http gitolite command bypass. (diff)
downloadgitolite-gentoo-53543ee3e6a837dc3ecca3c990f7ab6bd7ee933b.tar.gz
gitolite-gentoo-53543ee3e6a837dc3ecca3c990f7ab6bd7ee933b.tar.bz2
gitolite-gentoo-53543ee3e6a837dc3ecca3c990f7ab6bd7ee933b.zip
partial-copy would not propagate deletes; fixed
Diffstat (limited to 'src/VREF')
-rwxr-xr-xsrc/VREF/partial-copy9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/VREF/partial-copy b/src/VREF/partial-copy
index 19111de..55a7dcf 100755
--- a/src/VREF/partial-copy
+++ b/src/VREF/partial-copy
@@ -23,6 +23,15 @@ main=`git config --file $GL_REPO_BASE/$repo.git/config --get gitolite.partialCop
rand=$$
export GL_BYPASS_ACCESS_CHECKS=1
+if [ "$new" = "0000000000000000000000000000000000000000" ]
+then
+ # special case for deleting a ref (this is why it is important to put this
+ # VREF as the last one; if we got this far he is allowed to delete it)
+ git push -f $GL_REPO_BASE/$main.git :$ref || die "FATAL: failed to delete $ref"
+
+ exit 0
+fi
+
git push -f $GL_REPO_BASE/$main.git $new:refs/partial/br-$rand || die "FATAL: failed to send $new"
cd $GL_REPO_BASE/$main.git