- 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;
+ }