chiark / gitweb /
dgit: Gate sending "previously" on deliberately_not_fast_forward not $forceflag
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 31 May 2015 16:45:28 +0000 (17:45 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 31 May 2015 17:32:56 +0000 (18:32 +0100)
$forceflag will only be set if we actually think the ref is not fast
forwarding.  But the --deliberately flags may cause a repo reset which
will require us to mention the previous state, even if the push
appears to be ff.

dgit

diff --git a/dgit b/dgit
index a9fab5e..863104b 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -1661,7 +1661,7 @@ sub dopush ($) {
     responder_send_command("param head $head");
     responder_send_command("param csuite $csuite");
 
-    if ($forceflag) {
+    if (deliberately_not_fast_forward) {
        git_for_each_ref(lrfetchrefs, sub {
            my ($objid,$objtype,$lrfetchrefname,$reftail) = @_;
            my $rrefname= substr($lrfetchrefname, length(lrfetchrefs) + 1);