commit aaabf83f2dcb3f5cea3dc1f0227a88c7949e07d4 from: Omar Polo via: Thomas Adam date: Sat Aug 06 20:57:41 2022 UTC locate_hunk: set mangled earlier for clarity suggested by stsp@; no functional change. commit - 3b6e8f190b15806548d62418e2d3df56486cb631 commit + aaabf83f2dcb3f5cea3dc1f0227a88c7949e07d4 blob - 6e31c8d2cf7df53c75d28271fdeb51d2590fd306 blob + 1dac0c931a643d7ea49af837d8b4af3d5c7e7f61 --- lib/patch.c +++ lib/patch.c @@ -412,12 +412,12 @@ locate_hunk(FILE *orig, struct got_patch_hunk *h, off_ match_lineno = (*lineno)-1; } - if (*lineno >= h->old_from && match != -1) + if (*lineno >= h->old_from && match != -1) { + if (mangled) + h->ws_mangled = 1; break; + } } - - if (mangled) - h->ws_mangled = 1; if (err == NULL) { *pos = match;