chiark / gitweb /
git-debrebase: Improve/fix handling of $prose
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 22 Apr 2018 15:07:00 +0000 (16:07 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Jun 2018 15:07:01 +0000 (16:07 +0100)
Allow specification of the whole prose.  Set the default in
cmd_stitch.  Always include the word `stitch' in the reflog.

Also fix a comment typo.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
git-debrebase

index 882614195d2ba6068d8a989018f963ce429d8843..599fe150d12cdbae0038183976cc1f4f594b1b62 100755 (executable)
@@ -503,7 +503,7 @@ sub keycommits ($;$$$) {
     # $dgitimport->("unclean-$tagsfx", $msg)
     #   is callled for each situation or commit that
     #   wouldn't be found in a laundered branch
     # $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,
     #   interchange branch (pseudomerge, d/patches, changelog)
     # $trouble is for things whnich prevent the return of
     #   anchor and breakwater information; if that is ignored,
@@ -1065,10 +1065,10 @@ sub stitch ($$$$$) {
     fresh_workarea();
     my $new_head = make_commit [ $old_head, $ffq_prev ], [
        'Declare fast forward / record previous work',
     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";
     ];
     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 cmd_new_upstream_v0 () {
 }
 
 sub cmd_new_upstream_v0 () {
@@ -1282,7 +1282,7 @@ sub cmd_breakwater () {
 }
 
 sub cmd_stitch () {
 }
 
 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;
 
     GetOptions('prose=s', \$prose) or die badusage("bad options to stitch");
     badusage "no arguments allowed" if @ARGV;