Code

Merge branch 'jc/maint-checkout-index-to-prefix' into maint
[git.git] / git-add--interactive.perl
index a06172c69f59391a04b75a3866a3fbcb98a21ba0..06f70602cc619e9e13bdc609a43780ce8bc6570d 100755 (executable)
@@ -841,6 +841,10 @@ sub coalesce_overlapping_hunks {
        my ($last_o_ctx, $last_was_dirty);
 
        for (grep { $_->{USE} } @in) {
+               if ($_->{TYPE} ne 'hunk') {
+                       push @out, $_;
+                       next;
+               }
                my $text = $_->{TEXT};
                my ($o_ofs) = parse_hunk_header($text->[0]);
                if (defined $last_o_ctx &&
@@ -1317,7 +1321,6 @@ sub patch_update_file {
                open $fh, '| git apply --cached --recount';
                for (@{$head->{TEXT}}, @result) {
                        print $fh $_;
-                       print STDERR $_;
                }
                if (!close $fh) {
                        for (@{$head->{TEXT}}, @result) {