Re: [PATCH 3/5] apply: whitespace errors in context lines if we have

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rubén Justo <rjusto@xxxxxxxxx> writes:

> If the user says `--no-ignore-space-change`, there's no need to
> check for whitespace errors in the context lines.

Because the default is *not* to ignore space change, the command
should behave exactly the same way between two cases: (1) the user
uses the default and does not give the "--ignore-space-change"
option, and (2) the user gives the "--no-ignore-space-change" option
explicitly.  So I am very much convinced that [1/5] is unneeded, and
"If the user says `--no-*`" in the above proposed log message is
insufficient (at least it also needs to say "or uses the default and
does not say "--ignore-space-change").

> Don't do it.

No need to say this, when the paragraphs above clearly and
unambiguously leads to this conclusion.

> diff --git a/apply.c b/apply.c
> index 0cb9d38e5a..e1b4d14dba 100644
> --- a/apply.c
> +++ b/apply.c
> @@ -1734,7 +1734,8 @@ static int parse_fragment(struct apply_state *state,
>  			trailing++;
>  			check_old_for_crlf(patch, line, len);
>  			if (!state->apply_in_reverse &&
> -			    state->ws_error_action == correct_ws_error)
> +			    state->ws_error_action == correct_ws_error &&
> +			    state->ws_ignore_action != ignore_ws_none)
>  				check_whitespace(state, line, len, patch->ws_rule);

I am not 100% convinced that this change is _wrong_, but it does
smell like reverting a necessary change as I pointed out in another
reply.

Thanks.






[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux