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

Re: How mantainers check Git diffs and patches?

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 2, 2025, 05:19 UTC
Message-ID
<xmqq5xcxzxqj.fsf@gitster.g>
In-Reply-To
<aN3ozlH_pPnvdWPn@localhost>
Henrique Soares <henriquegogo@gmail.com> writes:
Show 12 quoted lines
> On Wed, Oct 01, 2025 at 09:41:46AM -0700, Junio C Hamano wrote:
>> Patches are medium for reliable transmission.  Once you apply the
>> patch to your tree (perhaps giving it its own topic branch, perhaps
>> to a detached HEAD with the full intention that you will discard it
>> after you are done inspecting the change the patch brings in), you
>> can use any regular tools you use while developing and reviewing
>> your own code.
>
> It makes totally sense. So I suppose you avoid to review the code just
> checking the e-mail patch in e-mail client, but first applying locally
> and then check it in your code editor in a separate branch, worktree or
> whatever, then back to e-mail thread and comment the code, right?

The other way around. With experience with the codebase, you'd learn to tell if a small-looking patch is truly small and only need the patch text to judge, would be helped if I have another window and have the code that would be modified if I were to apply the patch without actually applying, or its ramification is deep enough that I better apply it before making the final decision. For a truly complex patch series I'd first apply them and then read with "git log --reverse -p" with wider context (e.g., -W or -U8), occasionally looking at the entire file at the step in question with something like "git show HEAD~4:path/to/that/file". It does not happen all that often, but it is not so rare.

Previous: Henrique Soares
Message 9 of 9 in “How mantainers check Git diffs and patches?”
  1. Henrique SoaresOct 1, 2025
  2. Kristoffer HaugsbakkOct 1, 2025
  3. Jeff KingOct 1, 2025
  4. Henrique SoaresOct 2, 2025
  5. Konstantin RyabitsevOct 1, 2025
  6. Henrique SoaresOct 2, 2025
  7. Junio C HamanoOct 1, 2025
  8. Henrique SoaresOct 2, 2025
  9. Junio C HamanoOct 2, 2025

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.