X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=git-debrebase;h=d0fc8fd75032c963a2f8dff319af890d0cff3a08;hp=353b405ffa9cbec39ebefd2d001614da02426bf1;hb=38310744b1522293aa0c95e6a6c34671d2f4dd44;hpb=7b8e6ff1d7c697ec131f6ab9106583c8a28d3e7f diff --git a/git-debrebase b/git-debrebase index 353b405f..d0fc8fd7 100755 --- a/git-debrebase +++ b/git-debrebase @@ -1081,9 +1081,8 @@ sub keycommits ($;$$$$$) { my ($head, $furniture, $unclean, $trouble, $fatal, $claimed_bw) = @_; # => ($anchor, $breakwater) - # $unclean->("unclean-$tagsfx", $msg, $cl) # $furniture->("unclean-$tagsfx", $msg, $cl) - # $dgitimport->("unclean-$tagsfx", $msg, $cl)) + # $unclean->("unclean-$tagsfx", $msg, $cl) # is callled for each situation or commit that # wouldn't be found in a laundered branch # $furniture is for furniture commits such as might be found on an @@ -2635,13 +2634,18 @@ sub cmd_convert_to_gbp () { my (undef, undef, undef, $ffq, $gdrlast) = ffq_prev_branchinfo(); my ($anchor, $breakwater) = keycommits $head, 0; my $out = $breakwater; - make_patches_staged $head; - in_workarea sub { - $out = make_commit [$out], [ - 'Commit patch queue (converted from git-debrebase format)', - '[git-debrebase convert-to-gbp: commit patches]', - ]; - }; + my $any = make_patches_staged $head; + if ($any) { + in_workarea sub { + $out = make_commit [$out], [ + 'Commit patch queue (converted from git-debrebase format)', + '[git-debrebase convert-to-gbp: commit patches]', + ]; + }; + } else { + # in this case, it can be fast forward + $out = $head; + } if (defined $ffq) { push @deferred_updates, "delete $ffq"; push @deferred_updates, "delete $gdrlast";