Re: [PATCH] diff: fix behaviour of the "-s" option
- From
Sergey Organov <sorganov@gmail.com>
- Date
- May 5, 2023, 17:07 UTC
- Message-ID
- <87h6sqzoyt.fsf@osv.gnss.ru>
- In-Reply-To
- <xmqq8re2g2pj.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 17 quoted lines
> Sergey Organov <sorganov@gmail.com> writes: > >>> * Whenever we set DIFF_FORMAT_FOO becasuse we saw the "--foo" >>> option (e.g. DIFF_FORMAT_RAW is set when the "--raw" option is >>> given), we make sure we drop DIFF_FORMAT_NO_OUTPUT. We forgot to do >>> so in some of the options and caused (2) above. >>> * When processing "-s" option, we should not just set >>> DIFF_FORMAT_NO_OUTPUT bit, but clear other DIFF_FORMAT_* bits. We >>> didn't do so and retained format bits set by options previously >>> seen, causing (1) above. >> Sounds good to me. Doesn't this makes DIFF_FORMAT_NO_OUTPUT obsolete >> as well, I wonder, as absence of any output bits effectively means >> "no output"? > > Not quite. The latter is not "set 0 to output_format word", but "set 0 > to output_format word and then flip only NO_OUTPUT bit on". I've > written a bit more on it in a follow-up message to the patch.
Yep, I've noticed that post after I sent the question.
Thanks, -- Sergey Organov