Skip to content

Commit

Permalink
fixup! built-in add -p: implement the hunk splitting feature
Browse files Browse the repository at this point in the history
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 <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Nov 14, 2019
1 parent b6610d7 commit ca06a95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion add-patch.c
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ static int split_hunk(struct add_p_state *s, struct file_diff *file_diff,
end = hunk->end;
colored_end = hunk->colored_end;

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

file_diff->hunk_nr += splittable_into - 1;
ALLOC_GROW(file_diff->hunk, file_diff->hunk_nr, file_diff->hunk_alloc);
Expand Down

0 comments on commit ca06a95

Please sign in to comment.