summaryrefslogtreecommitdiff
path: root/git-add--interactive.perl
diff options
context:
space:
mode:
Diffstat (limited to 'git-add--interactive.perl')
-rwxr-xr-xgit-add--interactive.perl4
1 files changed, 4 insertions, 0 deletions
diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index 8f66b825dd..392efb913f 100755
--- a/git-add--interactive.perl
+++ b/git-add--interactive.perl
@@ -933,6 +933,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 &&