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

Re: [PATCH 4/5] SubmittingPatches: remove confusing guidance about base branches

From
LALinus Arver <linusa@google.com>
Date
Jul 13, 2023, 21:54 UTC
Message-ID
<owly351rh400.fsf@fine.c.googlers.com>
In-Reply-To
<xmqqa5w76jig.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 7 quoted lines
> "Linus Arver via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
>> For these reasons, remove the guidance _without_ preserving the meaning
>> of the underlying principle, and instead add an overview of the four
>> named branches.
>
> Meaning that this rewrites the guidance
Yes.
> and changes the meaning of the underlying principle?
Hmm, no. I think I should have written in my commit message instead:

--8<---------------cut here---------------start------------->8--- For these reasons, remove the guidance while still preserving the meaning of the underlying principle by adding an overview of the four named branches. --8<---------------cut here---------------end--------------->8---

However, I now think deleting the "base your work on the oldest branch that your change is relevant to" text was unnecessarily harsh. I think I can reword it to make it sound less contrary to the accompanying bullet points.

Will update in v2.
Show 15 quoted lines
>> -In general, always base your work on the oldest branch that your
>> -change is relevant to.
>> +The following branches are the typical starting points for new work:
>> +
>> +* maint
>> +* master
>> +* next
>> +* seen
>> +
>> +These branches are explained in detail in linkgit:gitworkflows[7].
>> +Choose the appropriate branch depending on the following scenarios:
>
> Please never suggest to build anything on 'next' or 'seen'.  They
> are inappropriate to base your work on, if your topic wants to have
> a realistic chance to graduate to 'master'.

I only included "next" and "seen" here just below "maint" and "master" because they were included as OK-places to start new work (albeit in exceptional cases) in one of the bullet points:

--8<---------------cut here---------------start------------->8---
* In the exceptional case that a new feature depends on several topics
  not in `master`, start working on `next` or `seen` privately and
  send out patches only for discussion. Once your new feature starts
  to stabilize, you would have to rebase it (see the "depends on other
  topics" above).
--8<---------------cut here---------------end--------------->8---
Show 6 quoted lines
> If you are making tree-wide changes, while somebody else is also
> making another tree-wide changes, your topic may have severe overlap
> with the other person's topic.  In which case, you may be tempted to
> build on 'next' that has the other person's topic, but doing so would
> mean you'll not just depend on the other topic, but with all the
> other topics that are already in 'next'.

Good point. I will include this tip in v2 (seems like something that would be especially helpful for newer contributors).

Show 17 quoted lines
> That would make the basic choices simpler.
>
>  * If you are fixing bugs in the released version, build on 'maint'
>    (which may mean you have to fix things without using new API
>    features on the cutting edge that recently appeared in 'master'
>    but were not available in the released version).
>
>  * If you are adding new features, build on 'master'.
>
> Under exceptional circumstances that you need to depend on a
> selected few topics that are already in 'next' but not in 'master',
> you may want to fork your base-branch from 'master', merge these
> selected few topics to it, and call that your base-branch (which
> nobody else has).  And then you build on top of it.  When sending
> patches out, because your synthetic base-branch is something only
> you have, you'd need to communicate how you created it in your cover
> letter to allow others to recreate it.

I strongly agree that this is simpler. One thing I would change is to use a phrase like "start your work" instead of the word "build" because the latter on quick glance could be misinterpreted as literally building (compiling/packaging) the project.

Will incorporate in v2 (thank you for the suggestion; will credit you in a "Helped-by: ..." trailer).

Previous: Junio C HamanoNext: Linus Arver via GitGitGadget
Message 11 of 38 in “SubmittingPatches: clarify which branch to use”
  1. 0/5 SubmittingPatches: clarify which branch to useLinus Arver via GitGitGadget, Jul 8, 2023
  2. 2/5 SubmittingPatches: be more explicitLinus Arver via GitGitGadget, Jul 8, 2023
  3. Junio C HamanoJul 8, 2023
  4. Linus ArverJul 13, 2023
  5. Junio C HamanoJul 13, 2023
  6. 1/5 SubmittingPatches: reword awkward phrasingLinus Arver via GitGitGadget, Jul 8, 2023
  7. Junio C HamanoJul 8, 2023
  8. 3/5 SubmittingPatches: discuss subsystems separately from git.gitLinus Arver via GitGitGadget, Jul 8, 2023
  9. 4/5 SubmittingPatches: remove confusing guidance about base branchesLinus Arver via GitGitGadget, Jul 8, 2023
  10. Junio C HamanoJul 8, 2023
  11. Linus ArverJul 13, 2023
  12. 5/5 SubmittingPatches: define topic branchesLinus Arver via GitGitGadget, Jul 8, 2023
  13. 0/5 SubmittingPatches: clarify which branch to useLinus Arver via GitGitGadget, Jul 14, 2023
  14. 2/5 SubmittingPatches: discuss subsystems separately from git.gitLinus Arver via GitGitGadget, Jul 14, 2023
  15. 1/5 SubmittingPatches: reword awkward phrasingLinus Arver via GitGitGadget, Jul 14, 2023
  16. 3/5 SubmittingPatches: de-emphasize branches as starting pointsLinus Arver via GitGitGadget, Jul 14, 2023
  17. 4/5 SubmittingPatches: emphasize need to communicate non-default starting pointsLinus Arver via GitGitGadget, Jul 14, 2023
  18. 5/5 SubmittingPatches: simplify guidance for choosing a starting pointLinus Arver via GitGitGadget, Jul 14, 2023
  19. Junio C HamanoJul 14, 2023
  20. Linus ArverJul 26, 2023
  21. Linus ArverJul 26, 2023
  22. Junio C HamanoJul 26, 2023
  23. 0/5 SubmittingPatches: clarify which branch to useLinus Arver via GitGitGadget, Jul 26, 2023
  24. 1/5 SubmittingPatches: reword awkward phrasingLinus Arver via GitGitGadget, Jul 26, 2023
  25. 4/5 SubmittingPatches: emphasize need to communicate non-default starting pointsLinus Arver via GitGitGadget, Jul 26, 2023
  26. 2/5 SubmittingPatches: discuss subsystems separately from git.gitLinus Arver via GitGitGadget, Jul 26, 2023
  27. 5/5 SubmittingPatches: simplify guidance for choosing a starting pointLinus Arver via GitGitGadget, Jul 26, 2023
  28. 3/5 SubmittingPatches: de-emphasize branches as starting pointsLinus Arver via GitGitGadget, Jul 26, 2023
  29. Junio C HamanoJul 26, 2023
  30. Linus ArverJul 26, 2023
  31. 6/5 SubmittingPatches: choice of base for fixing an older maintenance trackJunio C Hamano, Jul 26, 2023
  32. Eric SunshineJul 26, 2023
  33. Junio C HamanoJul 26, 2023
  34. 7/5 SubmittingPatches: explain why 'next' and above are inappropriate baseJunio C Hamano, Jul 26, 2023
  35. Linus ArverJul 27, 2023
  36. 8/5 SubmittingPatches: use of older maintenance tracks is an exceptionJunio C Hamano, Jul 26, 2023
  37. Linus ArverJul 27, 2023
  38. Junio C HamanoJul 27, 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.