From: Ian Jackson Date: Sat, 21 Mar 2015 12:01:35 +0000 (+0000) Subject: dgit-repos-server: Move onwardpush and break up its @cmd construction X-Git-Tag: debian/0.30~256 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=a095d9f6fdf2aa56fae21997baa4e965071f0f77 dgit-repos-server: Move onwardpush and break up its @cmd construction --- diff --git a/infra/dgit-repos-server b/infra/dgit-repos-server index ed27c0ea..74cbff32 100755 --- a/infra/dgit-repos-server +++ b/infra/dgit-repos-server @@ -222,6 +222,17 @@ sub movetogarbage () { or die "rename repo $realdestrepo to $garbagerepo: $!"; } +sub onwardpush () { + my @cmd = (qw(git send-pack), $destrepo); + push @cmd, qw(--force) if $policy & NOFFCHECK; + push @cmd, "$commit:refs/dgit/$suite", + "$tagval:refs/tags/$tagname"); + debugcmd @cmd; + $!=0; + my $r = system @cmd; + !$r or die "onward push to $destrepo failed: $r $!"; +} + #----- git-receive-pack ----- sub fixmissing__git_receive_pack () { @@ -538,16 +549,6 @@ sub checks () { } } -sub onwardpush () { - my @cmd = (qw(git send-pack), $destrepo, - "$commit:refs/dgit/$suite", - "$tagval:refs/tags/$tagname"); - debugcmd @cmd; - $!=0; - my $r = system @cmd; - !$r or die "onward push failed: $r $!"; -} - sub stunthook () { debug "stunthook"; chdir $workrepo or die "chdir $workrepo: $!";