add -p: fix counting empty context lines in edited patches
[gitweb.git] / git-add--interactive.perl
index ab022ec0737607ef6b3302e6f9203835732cbe37..8361ef45e722f84140995e48f26ff2fa3c1b520b 100755 (executable)
@@ -1047,7 +1047,7 @@ sub recount_edited_hunk {
                        $o_cnt++;
                } elsif ($mode eq '+') {
                        $n_cnt++;
-               } elsif ($mode eq ' ') {
+               } elsif ($mode eq ' ' or $mode eq "\n") {
                        $o_cnt++;
                        $n_cnt++;
                }