From 1837d3b05b891491c548a4a3b869f5ed24239886 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 9 Jan 2017 16:03:45 +0000 Subject: [PATCH] dgit: $isuite fixes: defer pushing and rpush_handle_protovsn_bothends in rpush We mustn't call pushing until we have parsed the arguments enough to find $isuite. So remove the call to pushing from cmd_remote_push_build_host. Now we rely on cmd_push's call to pushing, which it does after the argument parsing. We then need to move rpush_handle_protovsn_bothends (which implicitly calls accesss_*) too, until we have got $isuite and called pushing(). We can move that into dopush. Signed-off-by: Ian Jackson --- dgit | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dgit b/dgit index e314791f..11f473ca 100755 --- a/dgit +++ b/dgit @@ -4007,6 +4007,7 @@ END prep_ud(); access_giturl(); # check that success is vaguely likely + rpush_handle_protovsn_bothends() if $we_are_initiator; select_tagformat(); my $clogpfn = ".git/dgit/changelog.822.tmp"; @@ -4380,8 +4381,6 @@ sub cmd_remote_push_build_host { $we_are_responder = 1; $us .= " (build host)"; - pushing(); - open PI, "<&STDIN" or die $!; open STDIN, "/dev/null" or die $!; open PO, ">&STDOUT" or die $!; @@ -4400,7 +4399,6 @@ sub cmd_remote_push_build_host { unless defined $protovsn; responder_send_command("dgit-remote-push-ready $protovsn"); - rpush_handle_protovsn_bothends(); changedir $dir; &cmd_push; } -- 2.30.2