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

Re: Should "git apply --check" imply verbose?

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 20, 2013, 17:57 UTC
Message-ID
<xmqqioz06y9m.fsf@gitster.dls.corp.google.com>
In-Reply-To
<5213873A.6010003@windriver.com>
Paul Gortmaker <paul.gortmaker@windriver.com> writes:
> TL;DR -- "git apply --reject" implies verbose, but the similar
> "git apply --check" does not, which seems inconsistent.

Hmmm, I am of two minds. From purely idealistic point of view, I can see why defaulting both to non-verbose may look a more attractive way to go, but I have my reservations that is more than the usual change-aversion.

Historically, "check" was primarily meant to see if the patch is applicable cleanly in scripts, and we never thought it would make any sense to make it verbose by default.

On the other hand, the operation of "reject", which was a much later invention, was primarily meant to be observed by humans to see how the patch failed to cleanly apply and where, to help them decide where to look in the target to wiggle the rejected hunk into (even when it is driven from a script). It did not make much sense to squelch its output.

In addition, because "check" is an idempotent operation that does not touch anything in the index or the working tree, running with "check" and then "check verbose" is possible if somebody runs it without verbose and then decides later that s/he wants to see the details. But "reject" does touch the working tree files with applicable hunks, so after a quiet "reject", there is no way to see the verbose output like you can with "check".

Previous: Paul GortmakerNext: Paul Gortmaker
Message 2 of 13 in “Should "git apply --check" imply verbose?”
  1. Paul GortmakerAug 20, 2013
  2. Junio C HamanoAug 20, 2013
  3. Paul GortmakerAug 20, 2013
  4. Jonathan NiederAug 20, 2013
  5. Paul GortmakerAug 20, 2013
  6. Junio C HamanoAug 20, 2013
  7. Steven RostedtAug 20, 2013
  8. Junio C HamanoAug 20, 2013
  9. Steven RostedtAug 20, 2013
  10. Paul GortmakerAug 20, 2013
  11. Junio C HamanoAug 20, 2013
  12. Junio C HamanoAug 20, 2013
  13. Steven RostedtAug 20, 2013

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.