chiark / gitweb /
git-debrebase: new-upstream-v0: use last upstream merge in breakwater branch
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 30 Jan 2018 18:30:56 +0000 (18:30 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Jun 2018 11:25:49 +0000 (12:25 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
git-debrebase

index 8a43111..8c77dbc 100755 (executable)
@@ -831,10 +831,13 @@ sub cmd_new_upstream_v0 () {
     # now we need to investigate the branch this generates the
     # laundered version but we don't switch to it yet
     my $old_head = get_head();
-    my ($old_laundered_tip,$old_bw) = walk $old_head;
+    my ($old_laundered_tip,$old_bw,$old_upstream_update) = walk $old_head;
 
     my $old_bw_cl = classify $old_bw;
-    my $old_upstream = parsecommit $old_bw_cl->{OrigParents}[0]{CommitId};
+    my $old_upstream_update_cl = classify $old_upstream_update;
+    confess unless $old_upstream_update_cl->{OrigParents};
+    my $old_upstream = parsecommit
+        $old_upstream_update_cl->{OrigParents}[0]{CommitId};
 
     my $problems = 0;
     my $problem = sub {