summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2013-08-23 12:15:10 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2013-08-23 12:15:10 +0100
commit670141eff1905429cfd4f791664bf42e916ce49e (patch)
tree3ccd3f65988736b190c614813a9e4904dd5f252b /dgit
parent5a4dc24f3a020c36a4171d5448cf8a0f50c91f75 (diff)
Fix comparison of archive's .dsc's hash and git branch head to DTRT.
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit8
1 files changed, 6 insertions, 2 deletions
diff --git a/dgit b/dgit
index 94adcb5..8911c8e 100755
--- a/dgit
+++ b/dgit
@@ -659,11 +659,12 @@ sub fetch_from_archive () {
if (defined $dsc_hash) {
fail "missing git history even though dsc has hash -".
" could not find commit $dsc_hash".
- " (should be in ".access_giturl()."#".rref().")"
+ " (should be in ".access_giturl()."#".rrref().")"
unless $upload_hash;
$hash = $dsc_hash;
ensure_we_have_orig();
- if (is_fast_fwd($dsc_hash,$upload_hash)) {
+ if ($dsc_hash eq $upload_hash) {
+ } elsif (is_fast_fwd($dsc_hash,$upload_hash)) {
print STDERR <<END or die $!;
Git commit in archive is behind the last version allegedly pushed/uploaded.
@@ -672,6 +673,9 @@ Last allegedly pushed/uploaded: $upload_hash
$later_warning_msg
END
$hash = $upload_hash;
+ } else {
+ fail "archive's .dsc refers to ".$dsc_hash.
+ " but this is an ancestor of ".$upload_hash;
}
} else {
$hash = generate_commit_from_dsc();