diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-12-08 22:47:09 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-12-08 22:47:09 -0800 |
commit | ff86bdd5cac70850eea4791bea78efa19b228ebe (patch) | |
tree | e80c89fbffa06c6990886a92112547cf66ca2a07 /git-add--interactive.perl | |
parent | ca83dc53916d485e6654c6cce701794dd3a1ed32 (diff) | |
parent | 5c30b8f7dd2640a1b75fcbcdd3e175329c5b7bbe (diff) | |
download | git-ff86bdd5cac70850eea4791bea78efa19b228ebe.tar.gz |
Merge branch 'maint'
* maint:
add-interactive: fix deletion of non-empty files
pull: clarify advice for the unconfigured error case
Diffstat (limited to 'git-add--interactive.perl')
-rwxr-xr-x | git-add--interactive.perl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/git-add--interactive.perl b/git-add--interactive.perl index f813ffdaa1..cd43c34912 100755 --- a/git-add--interactive.perl +++ b/git-add--interactive.perl @@ -1216,7 +1216,11 @@ sub patch_update_file { if (@{$mode->{TEXT}}) { unshift @hunk, $mode; } - if (@{$deletion->{TEXT}} && !@hunk) { + if (@{$deletion->{TEXT}}) { + foreach my $hunk (@hunk) { + push @{$deletion->{TEXT}}, @{$hunk->{TEXT}}; + push @{$deletion->{DISPLAY}}, @{$hunk->{DISPLAY}}; + } @hunk = ($deletion); } |