mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-30 15:38:06 +01:00
Fix previous commit such that only -S/--skip ignores errors when applying
a patch, returning -f/--force and -t/--batch to their previous semantics. Pointed out by: asami
This commit is contained in:
parent
2c7f8b4ebd
commit
d2d11ded0f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=64156
@ -130,6 +130,9 @@ int check_patch = FALSE;
|
||||
/* or PATCH_INDEX_FIRST env. variable is set */
|
||||
int index_first;
|
||||
|
||||
/* TRUE if -S was specified on command line. */
|
||||
int skip_flag_specified = FALSE;
|
||||
|
||||
/* Apply a set of diffs as appropriate. */
|
||||
|
||||
int
|
||||
@ -313,6 +316,8 @@ char **argv;
|
||||
newwhere = pch_newfirst() + last_offset;
|
||||
if (skip_rest_of_patch) {
|
||||
abort_hunk();
|
||||
if (! skip_flag_specified)
|
||||
failed++;
|
||||
if (verbose)
|
||||
say3("Hunk #%d ignored at %ld.\n", hunk, newwhere);
|
||||
}
|
||||
@ -437,6 +442,7 @@ reinitialize_almost_everything()
|
||||
|
||||
reverse = reverse_flag_specified;
|
||||
skip_rest_of_patch = FALSE;
|
||||
skip_flag_specified = FALSE;
|
||||
|
||||
get_some_switches();
|
||||
|
||||
@ -567,6 +573,7 @@ get_some_switches()
|
||||
break;
|
||||
case 'S':
|
||||
skip_rest_of_patch = TRUE;
|
||||
skip_flag_specified = TRUE;
|
||||
break;
|
||||
case 't':
|
||||
batch = TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user