summaryrefslogtreecommitdiff
path: root/git-debrebase
diff options
context:
space:
mode:
Diffstat (limited to 'git-debrebase')
-rwxr-xr-xgit-debrebase23
1 files changed, 10 insertions, 13 deletions
diff --git a/git-debrebase b/git-debrebase
index 634ed76..3cab3ad 100755
--- a/git-debrebase
+++ b/git-debrebase
@@ -1501,28 +1501,25 @@ sub make_patches ($) {
'[git-debrebase: export and commit patches]',
];
};
- my $d = get_differs $head, $out;
- if ($d == 0) {
- return undef; # nothing to do
- } elsif ($d == D_PAT_ADD) {
- return $out; # OK
- } else {
- fail "Patch export produced patch amendments".
- " (abandoned output commit $out).".
- " Try laundering first.";
- }
+ return $out;
}
sub cmd_make_patches () {
badusage "no arguments allowed" if @ARGV;
my $old_head = get_head();
my $new = make_patches $old_head;
- snags_maybe_bail();
- if (!$new) {
+ my $d = get_differs $old_head, $new;
+ if ($d == 0) {
fail "No (more) patches to export." unless $opt_noop_ok;
return;
+ } elsif ($d == D_PAT_ADD) {
+ snags_maybe_bail();
+ update_head_checkout $old_head, $new, 'make-patches';
+ } else {
+ fail "Patch export produced patch amendments".
+ " (abandoned output commit $new).".
+ " Try laundering first.";
}
- update_head_checkout $old_head, $new, 'make-patches';
}
sub cmd_convert_from_gbp () {