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

Re: FORMAT_PATCH_NAME_MAX increase

From
Junio C Hamano <gitster@pobox.com>
Date
May 30, 2017, 13:37 UTC
Message-ID
<xmqqfufmbh4f.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CACBZZX4-T50q_eVWwJuBzoC6ocuG+v14Tm8wfK8h7FB_cMQzdQ@mail.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> Just curious do you know about https://github.com/trast/tbdiff ? If
> not it might have a high overlap with what you're doing.

Yes, that is a very good suggestion. You'd need to be able to actually apply the patches but the way I often do a review is very similar to (actually, I'd say it is identical workflow) Laszlo's, and it goes like this:

    $ git checkout topic ;# previous round
    $ git checkout master... ;# check out the fork point of previous one
    $ git am mbox ;# apply the updated one
    $ git tbdiff ..@{-1} @{-1}..

With the second step, the commit immediately before the previous round of patches were applied to is checked out as a detached HEAD, and then with the third step, the updated patches are applied. After these two steps, the history leading to HEAD is the latest patches, and the history leading to topic (which can be referred to as @{-1}, i.e. the branch we were previously on) is the previous round.

"git tbdiff" takes two ranges and compares these two series of commits. The first one says "commits included in the branch we are previously on (i.e. topic), excluding the ones on the current HEAD", which means "the patches from the previous round", and the second one says "commits included in the current HEAD, excluding the ones on the previous branch (i.e. topic)", which means "the patches from this latest round".

After that, I may conclude
    $ git checkout -B @{-1}

to update the tip of 'topic' with the latest set of patches (the reason why I type @{-1} is because that can stay constant in the workflow, no matter what the actual topic branch is called).

Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 9 of 11 in “FORMAT_PATCH_NAME_MAX increase”
  1. Laszlo ErsekMay 29, 2017
  2. Junio C HamanoMay 30, 2017
  3. Laszlo ErsekMay 30, 2017
  4. Junio C HamanoMay 30, 2017
  5. Ævar Arnfjörð BjarmasonMay 30, 2017
  6. Laszlo ErsekMay 30, 2017
  7. Laszlo ErsekMay 30, 2017
  8. Ævar Arnfjörð BjarmasonMay 30, 2017
  9. Junio C HamanoMay 30, 2017
  10. Ævar Arnfjörð BjarmasonMay 30, 2017
  11. Laszlo ErsekMay 30, 2017

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.