Add the missing commitish for the -patchqueue wrecknote.
Defend against undef (or too few) args to mwrecknote.
(The way we end up calling it means perl doesn't notice.)
In walk, ensure that we initialise $cl->{MergeWreckNotes}.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
sub mwrecknote ($$$) {
my ($wrecknotes, $reftail, $commitish) = @_;
sub mwrecknote ($$$) {
my ($wrecknotes, $reftail, $commitish) = @_;
+ confess unless defined $commitish;
$wrecknotes->{$reftail} = $commitish;
}
$wrecknotes->{$reftail} = $commitish;
}
printdebug "pec' $pec\n";
runcmd @git, qw(reset -q --hard), $pec;
$q->{MR}{PEC} = $pec;
printdebug "pec' $pec\n";
runcmd @git, qw(reset -q --hard), $pec;
$q->{MR}{PEC} = $pec;
- $mwrecknote->("$q->{LeftRight}-patchqueue");
+ $mwrecknote->("$q->{LeftRight}-patchqueue", $pec);
}
# now, because of reverse, we are on $input_q->{MR}{OQC}
runcmd @git, qw(checkout -q -b merge);
}
# now, because of reverse, we are on $input_q->{MR}{OQC}
runcmd @git, qw(checkout -q -b merge);
for (;;) {
$cl = classify $cur;
for (;;) {
$cl = classify $cur;
+ $cl->{MergeWreckNotes} //= {};
my $ty = $cl->{Type};
my $st = $cl->{SubType};
$prline->("$cl->{CommitId} $cl->{Type}");
my $ty = $cl->{Type};
my $st = $cl->{SubType};
$prline->("$cl->{CommitId} $cl->{Type}");