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

Re: [PATCH v2] git-p4: add P4 jobs to git commit message

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 19, 2016, 18:43 UTC
Message-ID
<xmqqh9ex1lsy.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CABEqOBwqW+BO4rtOx4ax35VacE4RZhpo_1pbqzTP_EGiSWasiQ@mail.gmail.com>
Jan Durovec <jan.durovec@gmail.com> writes:
Show 8 quoted lines
> On Tue, Apr 19, 2016 at 7:47 PM, Junio C Hamano <gitster@pobox.com> wrote:
>>
>> If you really want to know the preference, we prefer a preliminary
>> clean-up patch to correct existing style issues, followed by a new
>> feature patch that builds on the cleaned up codebase.
>
> Would it be acceptable the other way around? I.e. this patch followed
> by the one that fixes code style (once this gets merged)?

The reason I said "preference" and not "requirement" is because the answer to that question is "It depends."

When the primary change is something small and urgent (e.g. an important bugfix that needs to be merged down to 'maint' and older), we typically do not want to keep the fix waiting for preliminary clean-up patch to be reviewed. Instead, we'd say "let's fix it first on top of a known-to-be-crappy codebase, and postpone the clean-up until the dust settles".

>From experience, we already know that sometimes clean-up happens,

but often it does not, when we take this route, and it harms the long-term code health, but we just say an urgent fix is more important than piling a bit more cruft on the existing technical debt.

And that experience is why we say "preference is to have preliminary clean-up first".

> Reason being that I don't know how to use submitGit to generate a patch
> against a state that is not already in git repo (ie. based on another
> patch).

Any submitGit users? I think it lets you throw multiple-patch series just fine. In this case, you'd prepare a two patch series on a branch, 1/2 being the clean-up and 2/2 being the new feature, and if you give that branch to submitGit as a whole it should do the right thing, I'd imagine.

Previous: Jan DurovecNext: Jan Durovec
Message 8 of 21 in “git-p4: add P4 jobs to git commit message”
  1. git-p4: add P4 jobs to git commit messageJan Durovec, Apr 16, 2016
  2. Junio C HamanoApr 19, 2016
  3. Luke DiamandApr 19, 2016
  4. Junio C HamanoApr 19, 2016
  5. Jan DurovecApr 19, 2016
  6. Junio C HamanoApr 19, 2016
  7. Jan DurovecApr 19, 2016
  8. Junio C HamanoApr 19, 2016
  9. Jan DurovecApr 19, 2016
  10. Jan DurovecApr 19, 2016
  11. Junio C HamanoApr 19, 2016
  12. Jan DurovecApr 19, 2016
  13. Junio C HamanoApr 19, 2016
  14. Jan DurovecApr 19, 2016
  15. Luke DiamandApr 20, 2016
  16. Luke DiamandApr 20, 2016
  17. Junio C HamanoApr 20, 2016
  18. Luke DiamandApr 21, 2016
  19. Jan DurovecApr 20, 2016
  20. Junio C HamanoApr 19, 2016
  21. Lars SchneiderApr 19, 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.