git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Warning about conflict markers - undocumented 'diff --check' feature & suggestion

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 28, 2016, 23:01 UTC
Message-ID
<xmqqd1qe1a2i.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CALgdb5JuoYpHAPxTY2cHdbkcPUjKtsWQ_DY5rBrw-YKCwj2yvw@mail.gmail.com>
Ori Avtalion <ori@avtalion.name> writes:
Show 7 quoted lines
> A bug report and a suggestion:
>
> `git diff --check` has been warning about conflict markers since 2008:
> https://marc.info/?l=git&m=122398500726634&w=2
>
> This is an undocumented feature. The current documentation for the
> flag only mentions "whitespace errors".

Thanks for digging (even though I do not think the message you quoted has much to do with this).

04954043 (diff --check: detect leftover conflict markers, 2008-06-26) was the change that added this check to the "check whitespace breakage" codepath, which forgot to update the documentation.

And when 4f830390 (Documentation: git diff --check respects core.whitespace, 2011-06-22) rewrote the paragraph, it again didn't remember to update it to match the reality.

Care to try a patch?
Previous: Ori AvtalionNext: Ori Avtalion
Message 2 of 6 in “Warning about conflict markers - undocumented 'diff --check' feature & suggestion”
  1. Ori AvtalionMar 28, 2016
  2. Junio C HamanoMar 28, 2016
  3. Ori AvtalionMar 29, 2016
  4. Junio C HamanoMar 29, 2016
  5. Ori AvtalionMar 29, 2016
  6. Documentation: git diff --check detects conflict markersOri Avtalion, Mar 29, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.