summaryrefslogtreecommitdiff
path: root/git-add--interactive.perl
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-12-08 22:47:09 -0800
committerJunio C Hamano <gitster@pobox.com>2009-12-08 22:47:09 -0800
commitff86bdd5cac70850eea4791bea78efa19b228ebe (patch)
treee80c89fbffa06c6990886a92112547cf66ca2a07 /git-add--interactive.perl
parentca83dc53916d485e6654c6cce701794dd3a1ed32 (diff)
parent5c30b8f7dd2640a1b75fcbcdd3e175329c5b7bbe (diff)
downloadgit-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-xgit-add--interactive.perl6
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);
}