summaryrefslogtreecommitdiff
path: root/git-debrebase
diff options
context:
space:
mode:
Diffstat (limited to 'git-debrebase')
-rwxr-xr-xgit-debrebase11
1 files changed, 9 insertions, 2 deletions
diff --git a/git-debrebase b/git-debrebase
index 1961bcc..8a43111 100755
--- a/git-debrebase
+++ b/git-debrebase
@@ -473,7 +473,7 @@ sub walk ($;$$);
sub walk ($;$$) {
my ($input,
$nogenerate,$report) = @_;
- # => ($tip, $breakwater_tip)
+ # => ($tip, $breakwater_tip, $last_upstream_merge_in_breakwater)
# (or nothing, if $nogenerate)
# go through commits backwards
@@ -529,6 +529,8 @@ sub walk ($;$$) {
no warnings qw(exiting); last;
};
+ my $last_upstream_update;
+
for (;;) {
$cl = classify $cur;
my $ty = $cl->{Type};
@@ -546,6 +548,7 @@ sub walk ($;$$) {
$cur = $p0;
next;
} elsif ($ty eq 'BreakwaterStart') {
+ $last_upstream_update = $cur;
$build_start->('FirstPackaging', $cur);
} elsif ($ty eq 'Upstream') {
push @upp_cl, $cl;
@@ -570,6 +573,7 @@ sub walk ($;$$) {
$cur = $contrib;
next;
} elsif ($ty eq 'BreakwaterUpstreamMerge') {
+ $last_upstream_update = $cur;
$build_start->("PreviousBreakwater", $cur);
} elsif ($ty eq 'DgitImportUnpatched') {
my $pm = $pseudomerges[-1];
@@ -729,6 +733,9 @@ sub walk ($;$$) {
my $newcommit = cmdoutput @cmd;
confess "$ch ?" unless $rewriting or $newcommit eq $cl->{CommitId};
$build = $newcommit;
+ if (grep { $method eq $_ } qw(DgitImportUpstreamUpdate)) {
+ $last_upstream_update = $cur;
+ }
}
};
@@ -736,7 +743,7 @@ sub walk ($;$$) {
die sprintf "internal error %#x %s %s", $final_check, $build, $input
if $final_check & ~D_PAT_ADD;
- return ($build, $breakwater);
+ return ($build, $breakwater, $last_upstream_update);
}
sub get_head () { return git_rev_parse qw(HEAD); }