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

Re: [PATCH v2 0/3] {apply,alias}: convert pre-processor macros to enums

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Feb 15, 2023, 00:04 UTC
Message-ID
<CAPig+cT98gscoD=Fh-QzJxruxdZmjGKW3gy95cA3xAokV7J4rw@mail.gmail.com>
In-Reply-To
<CADE8NaqvP1JbLL89prOCu2Qo-ZVJTTN_CZjk7bJwzMctV9Z2Bw@mail.gmail.com>
On Fri, Feb 10, 2023 at 11:00 PM Vinayak Dev <vinayakdev.sci@gmail.com> wrote:
Show 23 quoted lines
> On Sat, 11 Feb 2023 at 03:31, Junio C Hamano <gitster@pobox.com> wrote:
> > Vinayak Dev <vinayakdev.sci@gmail.com> writes:
> > > Revert changes to alias.c, and change variable types in apply.c
> >
> > When you send out a rerolled series, you do not have to show your
> > past mistakes.  This [v2] is structured as a three patch series
> > whose first one makes a similar mess as what [v1] did, the second
> > one and the third one then revert some parts of that earlier mess.
> >
> > That is not what you want to show your reviewers, and more
> > importantly, that is not what we want to record in our history.
> > Rerolling a series is your chance to pretend that you are much
> > better programmer than you who wrote the [v1] patch.  The review
> > exchange is to help you do that.  Please take advantage of that.
> >
> > You may find "git rebase -i" is a useful tool to help you pretend
> > that you got to the ideal end result without these "I tried this
> > first, which was wrong in these points, which I correct in a
> > subsequent step" steps.
>
> OK, I will keep that in mind before sending subsequent patches.
> Should I re-send [v2] after making corrections for this mistake?
> That would make the corrections more obvious and the mistakes less.
You should send a v3 which completely replaces v1 and v2.

To prepare v3, use the "squash" (or "fixup") command of `git rebase -i` to squash all three patches from v2 into a single patch, so that v3 consists of just one patch. The squashed patch should contain only changes to "apply.c"; specifically, changing #define to `enum`, and changing the variable declarations from `int` to `enum`.

You can also update the commit message of the squashed patch so that it explains the reason for the patch: specifically, the debugger will display the values symbolically rather than as mere numbers.

Finally, proofread the commit message and the patch itself, and resubmit as v3.
Previous: Vinayak DevNext: Vinayak Dev
Message 7 of 8 in “{apply,alias}: convert pre-processor macros to enums”
  1. 0/3 {apply,alias}: convert pre-processor macros to enumsVinayak Dev, Feb 10, 2023
  2. 1/3 {apply,alias}: convert pre-processor macros to enumsVinayak Dev, Feb 10, 2023
  3. 2/3 {apply,alias}: convert pre-processor macros to enumsVinayak Dev, Feb 10, 2023
  4. 3/3 {apply,alias}: convert pre-processor macros to enumsVinayak Dev, Feb 10, 2023
  5. Junio C HamanoFeb 10, 2023
  6. Vinayak DevFeb 11, 2023
  7. Eric SunshineFeb 15, 2023
  8. Vinayak DevFeb 15, 2023

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.