if (@newpieces > 1) {
# need to make the upstream subtree merge commit
- my $us_tree = cmdoutput @git, qw(write-tree);
- my @cmd = (@git, qw(commit-tree), $us_tree);
- push @cmd, qw(-p), $_ foreach @upstream_merge_parents;
- push @cmd, qw(-m), "Combine upstreams for $new_upstream_version";
- push @cmd, qw(-m),
- "[git-debrebase new-upstream combine . ".
- (join " ", map { $_->{Name} } @newpieces[1..$#newpieces]).
- "]";
- $new_upstream = cmdoutput @cmd;
+ $new_upstream = make_commit \@upstream_merge_parents,
+ [ "Combine upstreams for $new_upstream_version",
+ ("[git-debrebase new-upstream combine . ".
+ (join " ", map { $_->{Name} } @newpieces[1..$#newpieces]).
+ "]"),
+ ];
}
# $new_upstream is either the single upstream commit, or the