Skip to content

Commit ca06a95

Browse files
committed
fixup! built-in add -p: implement the hunk splitting feature
A long time ago, Phillip Wood pointed out that this would be easier to read, and I agreed, but failed to backport the fix to Git for Windows' `master` branch. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent b6610d7 commit ca06a95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

add-patch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ static int split_hunk(struct add_p_state *s, struct file_diff *file_diff,
829829
end = hunk->end;
830830
colored_end = hunk->colored_end;
831831

832-
memcpy(&remaining, &hunk->header, sizeof(remaining));
832+
remaining = hunk->header;
833833

834834
file_diff->hunk_nr += splittable_into - 1;
835835
ALLOC_GROW(file_diff->hunk, file_diff->hunk_nr, file_diff->hunk_alloc);

0 commit comments

Comments
 (0)