Message ID | 7bdcd2df01246932e452417815368f6c56d83e8d.1721491320.git.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 60cf761ed14298d618597e87e50f25bb61171e84 |
Headers | show |
Series | add-patch: handle splitting hunks with diff.suppressBlankEmpty | expand |
diff --git a/add-patch.c b/add-patch.c index 8feb719483f..2a72ad63d14 100644 --- a/add-patch.c +++ b/add-patch.c @@ -1178,14 +1178,14 @@ static ssize_t recount_edited_hunk(struct add_p_state *s, struct hunk *hunk, header->old_count = header->new_count = 0; for (i = hunk->start; i < hunk->end; ) { - switch (s->plain.buf[i]) { + switch(normalize_marker(&s->plain.buf[i])) { case '-': header->old_count++; break; case '+': header->new_count++; break; - case ' ': case '\r': case '\n': + case ' ': header->old_count++; header->new_count++; break;