diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-09-18 12:46:37 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-09-25 20:12:52 +0100 |
commit | 136eec507183426c8daebd3dc201434608a136a1 (patch) | |
tree | 9c8781765f01cd9f4f00bb8b48609a292c64bbcc /dgit | |
parent | 1698ba5933326f9895504af33a94ac6ee8f5321d (diff) |
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 <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 33 |
1 files changed, 17 insertions, 16 deletions
@@ -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 --), |