From 7c57131ff6c444187b09ed9be5b58e5c0112a5e2 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 11 Sep 2013 21:42:23 +0100 Subject: [PATCH] rename upload_hash to lastpush_hash --- dgit | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/dgit b/dgit index 42675366..562cef08 100755 --- a/dgit +++ b/dgit @@ -485,7 +485,7 @@ sub create_remote_git_repo () { } } -our ($dsc_hash,$upload_hash); +our ($dsc_hash,$lastpush_hash); our $ud = '.git/dgit/unpack'; @@ -596,8 +596,8 @@ END my $outputhash = make_commit qw(../commit.tmp); my $cversion = getfield $clogp, 'Version'; print "synthesised git commit from .dsc $cversion\n"; - if ($upload_hash) { - runcmd @git, qw(reset --hard), $upload_hash; + if ($lastpush_hash) { + runcmd @git, qw(reset --hard), $lastpush_hash; runcmd qw(sh -ec), 'dpkg-parsechangelog >>../changelogold.tmp'; my $oldclogp = parsecontrol('../changelogold.tmp','previous changelog'); my $oversion = getfield $oldclogp, 'Version'; @@ -608,7 +608,7 @@ END open C, ">../commit2.tmp" or die $!; print C <; - chomp $upload_hash; - die "$lrref_fn $upload_hash ?" unless $upload_hash =~ m/^\w+$/; + $lastpush_hash = ; + chomp $lastpush_hash; + die "$lrref_fn $lastpush_hash ?" unless $lastpush_hash =~ m/^\w+$/; } elsif ($! == &ENOENT) { - $upload_hash = ''; + $lastpush_hash = ''; } else { die "$lrref_fn $!"; } - print DEBUG "previous reference hash=$upload_hash\n"; + print DEBUG "previous reference hash=$lastpush_hash\n"; my $hash; if (defined $dsc_hash) { fail "missing git history even though dsc has hash -". " could not find commit $dsc_hash". " (should be in ".access_giturl()."#".rrref().")" - unless $upload_hash; + unless $lastpush_hash; $hash = $dsc_hash; ensure_we_have_orig(); - if ($dsc_hash eq $upload_hash) { - } elsif (is_fast_fwd($dsc_hash,$upload_hash)) { + if ($dsc_hash eq $lastpush_hash) { + } elsif (is_fast_fwd($dsc_hash,$lastpush_hash)) { print STDERR <