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

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

From
Ori Avtalion <ori@avtalion.name>
Date
Mar 29, 2016, 18:27 UTC
Message-ID
<CALgdb5LS9EgqaBsm6vEWfQz-BZE=xH42fFdF5-eg-XyNsRBYkA@mail.gmail.com>
In-Reply-To
<xmqqvb45xhw1.fsf@gitster.mtv.corp.google.com>
On Tue, Mar 29, 2016 at 9:23 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 6 quoted lines
> Ori Avtalion <ori@avtalion.name> writes:
> I am not sure what "similar functionality" you are imagining.
>
> "git add" does not show any changes, it just does what it was told
> to do.  If the user is unsure, s/he should make it the habit to
> check what s/he is doing with "git diff".

I was thinking of an off-by-default setting where git-add outright refuses to stage changes that do not pass "diff --check". I understand if that's a big deviation from the spirit of the tool, and perhaps not a good idea.

Previous: Junio C HamanoNext: Ori Avtalion
Message 5 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.