From 136eec507183426c8daebd3dc201434608a136a1 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 18 Sep 2016 12:46:37 +0100 Subject: Push reorg: Postpone FF check We need to do this after the quilt fixup, because we are going to make quilt fixup perhaps generate a pseudo-merge. Signed-off-by: Ian Jackson --- dgit | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'dgit') diff --git a/dgit b/dgit index 879adea..90b1fde 100755 --- a/dgit +++ b/dgit @@ -2513,22 +2513,6 @@ END " if this is intentional, use --new"; } - my $forceflag = ''; - if ($archive_hash) { - if (is_fast_fwd($archive_hash, 'HEAD')) { - # ok - } elsif (deliberately_not_fast_forward) { - $forceflag = '+'; - } else { - fail "dgit push: HEAD is not a descendant". - " of the archive's version.\n". - "dgit: To overwrite its contents,". - " use git merge -s ours ".lrref().".\n". - "dgit: To rewind history, if permitted by the archive,". - " use --deliberately-not-fast-forward"; - } - } - supplementary_message(<<'END'); Push failed, while preparing your push. You can retry the push, after fixing the problem, if you like. @@ -2589,6 +2573,23 @@ END } check_not_dirty(); + + my $forceflag = ''; + if ($archive_hash) { + if (is_fast_fwd($archive_hash, 'HEAD')) { + # ok + } elsif (deliberately_not_fast_forward) { + $forceflag = '+'; + } else { + fail "dgit push: HEAD is not a descendant". + " of the archive's version.\n". + "dgit: To overwrite its contents,". + " use git merge -s ours ".lrref().".\n". + "dgit: To rewind history, if permitted by the archive,". + " use --deliberately-not-fast-forward"; + } + } + changedir $ud; progress "checking that $dscfn corresponds to HEAD"; runcmd qw(dpkg-source -x --), -- cgit v1.2.3