Through the three line context of the change?
This is how git apply
describes it:
Ensure at least
<n>
lines of surrounding context match before and after each change.
When fewer lines of surrounding context exist they all must match.
So yes, even if the line numbers changed, the context is still key in determining if a patch should apply or not.
Regarding the numbering aspect, I didn't test, but see if the --start-number
option of git format-patch
command can help:
--start-number <n>
Start numbering the patches at
<n>
instead of 1.