diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-09-18 12:45:01 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-09-18 13:27:59 +0100 |
commit | d29d82031f1e2907e219b04916112cd5236bc476 (patch) | |
tree | 82017826cfef50c65bdf7e6adec20aff0daa664e /dgit | |
parent | e5038c74011be7177d65aa58437a020b0948812d (diff) |
Push reorg: Introduce $archive_hash in dopush (nfc)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -2506,9 +2506,16 @@ END if (check_for_git()) { git_fetch_us(); } + my $archive_hash = fetch_from_archive(); + if (!$archive_hash) { + $new_package or + fail "package appears to be new in this suite;". + " if this is intentional, use --new"; + } + my $forceflag = ''; - if (fetch_from_archive()) { - if (is_fast_fwd(lrref(), 'HEAD')) { + if ($archive_hash) { + if (is_fast_fwd($archive_hash, 'HEAD')) { # ok } elsif (deliberately_not_fast_forward) { $forceflag = '+'; @@ -2520,10 +2527,6 @@ END "dgit: To rewind history, if permitted by the archive,". " use --deliberately-not-fast-forward"; } - } else { - $new_package or - fail "package appears to be new in this suite;". - " if this is intentional, use --new"; } supplementary_message(<<'END'); |