sub badusage ($) {
my ($m) = @_;
- die "bad usage: $m\n";
+ print STDERR "bad usage: $m\n";
+ exit 12;
}
sub cfg ($;$) {
# $dgitimport->("unclean-$tagsfx", $msg)
# is callled for each situation or commit that
# wouldn't be found in a laundered branch
- # $furniture is forfurniture commits such as might be found on an
+ # $furniture is for furniture commits such as might be found on an
# interchange branch (pseudomerge, d/patches, changelog)
# $trouble is for things whnich prevent the return of
# anchor and breakwater information; if that is ignored,
fresh_workarea();
my $new_head = make_commit [ $old_head, $ffq_prev ], [
'Declare fast forward / record previous work',
- "[git-debrebase pseudomerge: stitch$prose]",
+ "[git-debrebase pseudomerge: $prose]",
];
push @deferred_updates, "update $gdrlast $new_head $git_null_obj";
- update_head $old_head, $new_head, "stitch";
+ update_head $old_head, $new_head, "stitch: $prose";
+}
+
+sub do_stitch ($) {
+ my ($prose) = @_;
+
+ my ($ffq_prev, $gdrlast, $ffq_prev_commitish) = ffq_prev_info();
+ if (!$ffq_prev_commitish) {
+ fail "No ffq-prev to stitch." unless $opt_noop_ok;
+ return;
+ }
+ my $dangling_head = get_head();
+
+ keycommits $dangling_head, \&snag, \&snag, \&snag;
+
+ stitch($dangling_head, $ffq_prev, $gdrlast, $ffq_prev_commitish, $prose);
}
sub cmd_new_upstream_v0 () {
}
sub cmd_stitch () {
- my $prose = '';
+ my $prose = 'stitch';
GetOptions('prose=s', \$prose) or die badusage("bad options to stitch");
badusage "no arguments allowed" if @ARGV;
+ do_stitch($prose);
+}
- my ($ffq_prev, $gdrlast, $ffq_prev_commitish) = ffq_prev_info();
- if (!$ffq_prev_commitish) {
- fail "No ffq-prev to stitch." unless $opt_noop_ok;
- return;
- }
- my $old_head = get_head();
-
- keycommits $old_head, \&snag, \&snag, \&snag;
-
- stitch($old_head, $ffq_prev, $gdrlast, $ffq_prev_commitish, $prose);
+sub cmd_conclude () {
+ badusage "no arguments allowed" if @ARGV;
+ do_launder_head 'launder for conclude';
+ do_stitch 'conclude';
}
sub cmd_convert_from_gbp () {