+sub cmd_stitch () {
+ my $prose = '';
+ GetOptions('prose=s', \$prose) or die badusage("bad options to stitch");
+ badusage "no arguments allowed" if @ARGV;
+ my ($status, $message, $current, $ffq_prev) = ffq_prev_branchinfo();
+ if ($status ne 'branch') {
+ fproblem $status, "could not check ffq-prev: $message";
+ fproblems_maybe_bail();
+ }
+ my $prev = $ffq_prev && git_get_ref $ffq_prev;
+ if (!$prev) {
+ fail "No ffq-prev to stitch." unless $opt_noop_ok;
+ }
+ $prose = ", $prose" if length $prose;
+ runcmd @git, qw(merge -s ours --no-edit -m), <<END;
+Declare fast forward / record previous work
+
+[git-debrebase pseudomerge: stitch$prose]
+END
+ # xxx should delete old ffq-prev
+ # xxx should avoid making pseudomerge if not needed
+ # xxx should make pseudomerge in temp tree so can do atomic update
+}
+