my $format = getfield $dsc, 'Format';
printdebug "format $format\n";
- my $head = git_rev_parse('HEAD');
+ my $actualhead = git_rev_parse('HEAD');
+ my $dgithead = $actualhead;
+ my $maintviewhead = undef;
if (madformat($format)) {
# user might have not used dgit build, so maybe do this now:
changedir $ud;
quilt_make_fake_dsc($upstreamversion);
my ($dgitview, $cachekey) =
- quilt_check_splitbrain_cache($head, $upstreamversion);
+ quilt_check_splitbrain_cache($actualhead, $upstreamversion);
$dgitview or fail
"--quilt=$quilt_mode but no cached dgit view:
perhaps tree changed since dgit build[-source] ?";
$split_brain = 1;
+ $dgithead = $dgitview;
+ $maintviewhead = $actualhead;
changedir '../../../..';
prep_ud(); # so _only_subdir() works, below
} else {
check_for_vendor_patches() if madformat($dsc->{format});
changedir '../../../..';
my $diffopt = $debuglevel>0 ? '--exit-code' : '--quiet';
- my @diffcmd = (@git, qw(diff), $diffopt, $tree);
+ my @diffcmd = (@git, qw(diff), $diffopt, $tree, $dgithead);
debugcmd "+",@diffcmd;
$!=0; $?=-1;
my $r = system @diffcmd;
}
responder_send_file('changes',$changesfile);
- responder_send_command("param head $head");
+ responder_send_command("param head $dgithead");
responder_send_command("param csuite $csuite");
responder_send_command("param tagformat $tagformat");
});
}
- my @tagwants = push_tagwants($cversion, $head,
+ my @tagwants = push_tagwants($cversion, $dgithead,
".git/dgit/tag");
my @tagobjfns;
}
runcmd_ordryrun @git, qw(push),access_giturl(), @pushrefs;
- runcmd_ordryrun @git, qw(update-ref -m), 'dgit push', lrref(), 'HEAD';
+ runcmd_ordryrun @git, qw(update-ref -m), 'dgit push', lrref(), $dgithead;
supplementary_message(<<'END');
Push failed, after updating the remote git repository.