summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2016-07-31 18:32:11 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2016-09-05 13:41:48 +0100
commit3e228ac23b8b7351a7de2957de1f42fb894bb1f5 (patch)
treebf3070d93d7a77a94b221f1039163608e9cae124 /dgit
parent26794272ebaac24b6e13795d0dfdeed35ec9e575 (diff)
Split tags: Preparation: Rename tag variables etc. in dopush
We are going to have different branches at once. Rename some variables to permit this distinction. We have $actualhead (whatever HEAD is), $dgithead (the dgit view), and $maintviewhead (the maintainer's view if different, or undef if not0. Change the existing references. Also change one reference to HEAD to $dgithead: when we update the local tracking ref for the dgit view, we need to use $dgitview. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit16
1 files changed, 10 insertions, 6 deletions
diff --git a/dgit b/dgit
index 9127ff6..102864c 100755
--- a/dgit
+++ b/dgit
@@ -2091,7 +2091,9 @@ END
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:
@@ -2101,11 +2103,13 @@ END
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 {
@@ -2124,7 +2128,7 @@ END
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;
@@ -2151,7 +2155,7 @@ END
}
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");
@@ -2164,7 +2168,7 @@ END
});
}
- my @tagwants = push_tagwants($cversion, $head,
+ my @tagwants = push_tagwants($cversion, $dgithead,
".git/dgit/tag");
my @tagobjfns;
@@ -2212,7 +2216,7 @@ END
}
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.