docs: submitting-patches: Require base tree information
Subsystems (2)
PATCH 1/1 docs: submitting-patches: Require base tree information
Many patches still don't include base tree information and can't be applied. Such patches can't be properly reviewed or tested, nor can they be accepted. submitting-patches.rst already describes how to include base tree information, but it's characterized as optional, appears only towards the end of the document, and is missing details.
Make some tweaks to hopefully increase the number of patches that include base tree information:
- Characterize base tree information as required, not optional.
- Mention it in the "The canonical patch format" section too.
- Clarify what commits are acceptable to use as base commits. Also use origin/master instead of master in the example.
- Mention how to handle prerequisite patches.
- Suggest setting the format.useAutoBase=true git configuration option.
- Mention falling back to free-form text as a last resort.
- Don't say base-commit can go "below the '---' line", since that implied it could go before the diff, which is an unnecessary alternative that differs from what 'git format-patch' produces.
- Free up some space for the new information by dropping the mention of needing at least git v2.9.0 (since that's quite old by now) and the example of 'git am' (since that isn't directly relevant to submitting patches, which is the topic of submitting-patches.rst).
--- Documentation/process/submitting-patches.rst | 92 ++++++++++++-------- 1 file changed, 58 insertions(+), 34 deletions(-)
Documentation/process/submitting-patches.rst +58 -34
@@ -25,6 +25,8 @@ Some subsystems and maintainer trees have additional information about their workflow and expectations, see Documentation/process/maintainer-handbooks.rst. +.. _obtain_a_current_source_tree: + Obtain a current source tree ----------------------------
@@ -678,6 +680,10 @@ The canonical patch message body contains the following: - The actual patch (``diff`` output). + - A ``base-commit`` line and zero or more ``prerequisite-patch-id`` + lines. (For a series, these are needed only in the cover letter or + first patch.) See :ref:`providing_base_tree_information`. + The Subject line format makes it very easy to sort the emails alphabetically by subject line - pretty much any email reader will support that - since because the sequence number is zero-padded,
@@ -847,6 +853,7 @@ unmanageable forest of references in email clients. If a link is helpful, you can use the https://lore.kernel.org/ redirector (e.g., in the cover email text) to link to an earlier version of the patch series. +.. _providing_base_tree_information: Providing base tree information -------------------------------
@@ -861,50 +868,67 @@ This is even more important for automated CI processes that attempt to run a series of tests in order to establish the quality of your submission before the maintainer starts the review. -If you are using ``git format-patch`` to generate your patches, you can -automatically include the base tree information in your submission by -using the ``--base`` flag. The easiest and most convenient way to use -this option is with topical branches:: +Therefore, with only rare exceptions, patches must include structured +base tree information in the form of a +``base-commit: <full commit hash>`` line naming a public commit, and +zero or more ``prerequisite-patch-id: <patch-id>`` lines. They go in +the first patch, or in the cover letter if one is present. Put them at +the very bottom, after the diff (or, in a cover letter, after the +diffstat) and just before the ``--`` signature delimiter if present. + +To make ``git format-patch`` generate this information, pass ``--base``. +It's easiest to use topical branches and ``--base=auto``:: - $ git checkout -t -b my-topical-branch master - Branch 'my-topical-branch' set up to track local branch 'master'. + $ git checkout -t -b my-topical-branch origin/master + branch 'my-topical-branch' set up to track 'origin/master'. Switched to a new branch 'my-topical-branch' [perform your edits and commits] - $ git format-patch --base=auto --cover-letter -o outgoing/ master - outgoing/0000-cover-letter.patch - outgoing/0001-First-Commit.patch - outgoing/... + $ git format-patch --base=auto --cover-letter origin/master + 0000-cover-letter.patch + 0001-First-Commit.patch + ... -When you open ``outgoing/0000-cover-letter.patch`` for editing, you will -notice that it will have the ``base-commit:`` trailer at the very -bottom, which provides the reviewer and the CI tools enough information -to properly perform ``git am`` without worrying about conflicts:: +For more information about ``--base``, see ``man git-format-patch``. - $ git checkout -b patch-review [base-commit-id] - Switched to a new branch 'patch-review' - $ git am patches.mbox - Applying: First Commit - Applying: ... - -Please see ``man git-format-patch`` for more information about this -option. +To ensure you don't forget to use ``--base``, consider setting the +``format.useAutoBase=true`` git configuration option to make +``git format-patch`` default to ``--base=auto``. .. note:: - The ``--base`` feature was introduced in git version 2.9.0. - -If you are not using git to format your patches, you can still include -the same ``base-commit`` trailer to indicate the commit hash of the tree -on which your work is based. You should add it either in the cover -letter or in the first patch of the series and it should be placed -either below the ``---`` line or at the very bottom of all other -content, right before your email signature. - -Make sure that base commit is in an official maintainer/mainline tree -and not in some internal, accessible only to you tree - otherwise it -would be worthless. + If ``git format-patch`` with ``--base=auto`` (or + ``format.useAutoBase=true``) can't detect a base commit, e.g. due to + the current branch having no upstream tracking branch, it exits with + an error. In such cases, pass an explicit base commit to ``--base`` + instead. This is also needed if git detects the wrong base commit, + such as when the upstream branch has local, unpublished commits. + +The base commit must be in a well-known public tree, such as the +subsystem development branch the patch is targeting. See +:ref:`obtain_a_current_source_tree`. Mainline or the latest linux-next +can also be acceptable bases, depending on the subsystem. + +If your patch(es) depend on unmerged patches that were sent separately, +then use the same base commit as those prerequisite patches. In your +local git branch, apply the prerequisite patches directly on top of the +desired base commit, then commit your new changes on top of that. Then, +run a command like the following:: + + $ git format-patch --base=<base> --cover-letter <last-prereq>..HEAD + +That makes ``git format-patch`` generate a ``base-commit`` line as well +as ``prerequisite-patch-id`` lines for the dependencies. + +In rare cases where the structured base tree information isn't flexible +enough (such as when prerequisite patches weren't sent publicly, were +modified from what was sent publicly, or weren't sent with the default 3 +lines of context that git uses to compute patch IDs), as a last resort +use free-form text in the cover letter or below the ``---`` line to +describe how to apply your patch(es). Giving a link to your patches in a +publicly accessible git branch can help in this case. However, note that +CI systems may be unable to apply your patch(es). Tooling -------
base-commit: f47d223627f80cb7a1eb14c585fe6cb35de5e984
Signature · 1 line
2.56.0.212.g129ede20d9-goog
Quoted 5 lines · Eric Biggers
Many patches still don't include base tree information and can't be applied. Such patches can't be properly reviewed or tested, nor can they be accepted.
submitting-patches.rstalready describes how to include base tree information, but it's characterized as optional, appears only towards the end of the document, and is missing details.
I'm happy with this change, but I'd disambiguate the title a bit. With b4, we started providing both a base-commit and base-tree footer, specifically because often times the "base-commit:" line by itself is not sufficient.
Imagine this scenario: a developer is working on some code in a feature branch and come across a pre-existing bug. They create a fork off of their feature branch to fix the bug and send it in. In this situation, the "base-commit" footer would be meaningless, because it references some transient commit-id in their feature branch. In an ideal scenario, the developer would rebase that bugfix branch on a known tag, but that doesn't always happen.
This observation doesn't really preclude this patch from being accepted, I'm just recording my own experience that, by itself, base-commit is often insufficient.
-K
Quoted 26 lines · Eric Biggers
Many patches still don't include base tree information and can't be applied. Such patches can't be properly reviewed or tested, nor can they be accepted.
submitting-patches.rstalready describes how to include base tree information, but it's characterized as optional, appears only towards the end of the document, and is missing details.Make some tweaks to hopefully increase the number of patches that include base tree information:
- Characterize base tree information as required, not optional.
- Mention it in the "The canonical patch format" section too.
- Clarify what commits are acceptable to use as base commits. Also use origin/master instead of master in the example.
- Mention how to handle prerequisite patches.
- Suggest setting the format.useAutoBase=true git configuration option.
- Mention falling back to free-form text as a last resort.
- Don't say base-commit can go "below the '---' line", since that implied it could go before the diff, which is an unnecessary alternative that differs from what 'git format-patch' produces.
Quoted 6 lines
- Free up some space for the new information by dropping the mention of needing at least git v2.9.0 (since that's quite old by now) and the example of 'git am' (since that isn't directly relevant to submitting patches, which is the topic of
submitting-patches.rst).Signed-off-by Eric Biggers <[email protected]>
LGTM!
Thanks.
Randy Dunlap
reviewerQuoted 18 lines · Konstantin Ryabitsev
Quoted 5 lines · Eric Biggers
Many patches still don't include base tree information and can't be applied. Such patches can't be properly reviewed or tested, nor can they be accepted.
submitting-patches.rstalready describes how to include base tree information, but it's characterized as optional, appears only towards the end of the document, and is missing details.I'm happy with this change, but I'd disambiguate the title a bit. With b4, we started providing both a base-commit and base-tree footer, specifically because often times the "base-commit:" line by itself is not sufficient.
Imagine this scenario: a developer is working on some code in a feature branch and come across a pre-existing bug. They create a fork off of their feature branch to fix the bug and send it in. In this situation, the "base-commit" footer would be meaningless, because it references some transient commit-id in their feature branch. In an ideal scenario, the developer would rebase that bugfix branch on a known tag, but that doesn't always happen.
Quoted 3 lines
This observation doesn't really preclude this patch from being accepted, I'm just recording my own experience that, by itself, base-commit is often insufficient.
Yeah, I was wondering about specifying tree as well as commit, so thanks answering before I even asked the question.
Most of my patches are made against linux-next. So: is this going to be acceptable?
(for linux-next-20261020:)
base-commit: 053966c344dbd346e71305f530e91ea77916189f
base-tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
linux-next how has over 400 trees in it. That's a tad prohibitive AFA cloning is concerned.
thanks.
Signature · 1 line
~Randy
Quoted 4 lines · Eric Biggers
Documentation/process/submitting-patches.rst +1
-3-Make sure that base commit is in an official maintainer/mainline tree -and not in some internal, accessible only to you tree - otherwise it -would be worthless. + If ``git format-patch`` with ``--base=auto`` (or
Documentation/process/submitting-patches.rst This is even more important for automated CI processes that attempt to · line 911
Quoted 10 lines
Documentation/process/submitting-patches.rst +10
-0+ ``format.useAutoBase=true``) can't detect a base commit, e.g. due to + the current branch having no upstream tracking branch, it exits with + an error. In such cases, pass an explicit base commit to ``--base`` + instead. This is also needed if git detects the wrong base commit, + such as when the upstream branch has local, unpublished commits. + +The base commit must be in a well-known public tree, such as the +subsystem development branch the patch is targeting. See +:ref:`obtain_a_current_source_tree`. Mainline or the latest linux-next +can also be acceptable bases, depending on the subsystem.
I disagree, that's pointlessly too hard requirement.
For many of my contributions base is obvious and not needed to be explicitly defined. For all the patches I accept, answer is the same - base is either obvious or if not and patch does not apply, then the base does not matter.
Requiring it is just bureaucracy without actual benefit.
The only benefit would be if maintainer COULD change its base to apply some patch with odd base... but this cannot happen. Maintainer base is fixed - it's the HEAD of his development branch for given category of commits (e.g. DTS branch for SoC maintainers).
Best regards,
Krzysztof
Quoted 28 lines · Randy Dunlap
Quoted 18 lines · Konstantin Ryabitsev
Quoted 5 lines · Eric Biggers
Many patches still don't include base tree information and can't be applied. Such patches can't be properly reviewed or tested, nor can they be accepted.
submitting-patches.rstalready describes how to include base tree information, but it's characterized as optional, appears only towards the end of the document, and is missing details.I'm happy with this change, but I'd disambiguate the title a bit. With b4, we started providing both a base-commit and base-tree footer, specifically because often times the "base-commit:" line by itself is not sufficient.
Imagine this scenario: a developer is working on some code in a feature branch and come across a pre-existing bug. They create a fork off of their feature branch to fix the bug and send it in. In this situation, the "base-commit" footer would be meaningless, because it references some transient commit-id in their feature branch. In an ideal scenario, the developer would rebase that bugfix branch on a known tag, but that doesn't always happen.
Quoted 3 lines
This observation doesn't really preclude this patch from being accepted, I'm just recording my own experience that, by itself, base-commit is often insufficient.
Yeah, I was wondering about specifying tree as well as commit, so thanks answering before I even asked the question.
Quoted 6 lines
Most of my patches are made against linux-next. So: is this going to be acceptable?
(for linux-next-20261020:)
base-commit:053966c344dbd346e71305f530e91ea77916189f
base-tree:git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.gitmaster
According to commit msg which claims that without base information "nor can they be accepted. " (ridiculous statement on its own, since base is for these contributions obvious and known), next would not be acceptable, because maintainers DO NOT work on next. So if base is necessary for the patch "to be accepted", then base pointing to something irrelevant to the maintainer does not fit that requirement.
This patch is just harmful to contribution process, just to fix limitations of bots/testing tools which apparently do not understand we have something like linux-next.
Best regards,
Krzysztof
Quoted 23 lines · Krzysztof Kozlowski
Quoted 4 lines · Eric Biggers
Documentation/process/submitting-patches.rst +1
-3-Make sure that base commit is in an official maintainer/mainline tree -and not in some internal, accessible only to you tree - otherwise it -would be worthless. + If ``git format-patch`` with ``--base=auto`` (orDocumentation/process/submitting-patches.rst This is even more important for automated CI processes that attempt to · line 911
Quoted 10 lines
Documentation/process/submitting-patches.rst +10
-0+ ``format.useAutoBase=true``) can't detect a base commit, e.g. due to + the current branch having no upstream tracking branch, it exits with + an error. In such cases, pass an explicit base commit to ``--base`` + instead. This is also needed if git detects the wrong base commit, + such as when the upstream branch has local, unpublished commits. + +The base commit must be in a well-known public tree, such as the +subsystem development branch the patch is targeting. See +:ref:`obtain_a_current_source_tree`. Mainline or the latest linux-next +can also be acceptable bases, depending on the subsystem.I disagree, that's pointlessly too hard requirement.
For many of my contributions base is obvious and not needed to be explicitly defined. For all the patches I accept, answer is the same - base is either obvious or if not and patch does not apply, then the base does not matter.
Quoted 6 lines
Requiring it is just bureaucracy without actual benefit.
The only benefit would be if maintainer COULD change its base to apply some patch with odd base... but this cannot happen. Maintainer base is fixed - it's the HEAD of his development branch for given category of commits (e.g. DTS branch for SoC maintainers).
There are many use cases for applying patches besides the final patch acceptance, such as review (by anyone, not just a maintainer), testing, CI systems, etc.
HEAD of a branch is of course not fixed, and changes every time a patch gets applied. That's especially relevant when wanting to check out an old patch for any reason. Trying to guess a base commit based on the date and patch subject is a waste of time.
- Eric
Quoted 31 lines · Eric Biggers
Quoted 23 lines · Krzysztof Kozlowski
Quoted 4 lines · Eric Biggers
Documentation/process/submitting-patches.rst +1
-3-Make sure that base commit is in an official maintainer/mainline tree -and not in some internal, accessible only to you tree - otherwise it -would be worthless. + If ``git format-patch`` with ``--base=auto`` (orDocumentation/process/submitting-patches.rst This is even more important for automated CI processes that attempt to · line 911
Quoted 10 lines
Documentation/process/submitting-patches.rst +10
-0+ ``format.useAutoBase=true``) can't detect a base commit, e.g. due to + the current branch having no upstream tracking branch, it exits with + an error. In such cases, pass an explicit base commit to ``--base`` + instead. This is also needed if git detects the wrong base commit, + such as when the upstream branch has local, unpublished commits. + +The base commit must be in a well-known public tree, such as the +subsystem development branch the patch is targeting. See +:ref:`obtain_a_current_source_tree`. Mainline or the latest linux-next +can also be acceptable bases, depending on the subsystem.I disagree, that's pointlessly too hard requirement.
For many of my contributions base is obvious and not needed to be explicitly defined. For all the patches I accept, answer is the same - base is either obvious or if not and patch does not apply, then the base does not matter.
Quoted 6 lines
Requiring it is just bureaucracy without actual benefit.
The only benefit would be if maintainer COULD change its base to apply some patch with odd base... but this cannot happen. Maintainer base is fixed - it's the HEAD of his development branch for given category of commits (e.g. DTS branch for SoC maintainers).
Quoted 8 lines
There are many use cases for applying patches besides the final patch acceptance, such as review (by anyone, not just a maintainer), testing, CI systems, etc.
HEAD of a branch is of course not fixed, and changes every time a patch gets applied. That's especially relevant when wanting to check out an old patch for any reason. Trying to guess a base commit based on the date and patch subject is a waste of time.
All these tools should just work on top of linux-next. Requiring people to add base like "next-20261021" or "tip-of-obvious-maintainer-tree" is pointless. I understand that base is helping, but helping and requiring an obvious information just do not go together.
So again: base has ZERO meaning to the maintainer process. It has meaning to tools, so fix the tools to work on known and obvious trees.
Best regards,
Krzysztof
Quoted 32 lines · Krzysztof Kozlowski
Quoted 31 lines · Randy Dunlap
Quoted 18 lines · Konstantin Ryabitsev
Quoted 5 lines · Eric Biggers
Many patches still don't include base tree information and can't be applied. Such patches can't be properly reviewed or tested, nor can they be accepted.
submitting-patches.rstalready describes how to include base tree information, but it's characterized as optional, appears only towards the end of the document, and is missing details.I'm happy with this change, but I'd disambiguate the title a bit. With b4, we started providing both a base-commit and base-tree footer, specifically because often times the "base-commit:" line by itself is not sufficient.
Imagine this scenario: a developer is working on some code in a feature branch and come across a pre-existing bug. They create a fork off of their feature branch to fix the bug and send it in. In this situation, the "base-commit" footer would be meaningless, because it references some transient commit-id in their feature branch. In an ideal scenario, the developer would rebase that bugfix branch on a known tag, but that doesn't always happen.
Quoted 3 lines
This observation doesn't really preclude this patch from being accepted, I'm just recording my own experience that, by itself, base-commit is often insufficient.
Yeah, I was wondering about specifying tree as well as commit, so thanks answering before I even asked the question.
Most of my patches are made against linux-next. So: is this going to be acceptable?
Quoted 6 lines
Quoted 3 lines
(for linux-next-20261020:)
base-commit:053966c344dbd346e71305f530e91ea77916189f
base-tree:git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.gitmasterAccording to commit msg which claims that without base information "nor can they be accepted. "
I actually wrote:
Many patches still don't include base tree information and can't be applied. Such patches can't be properly reviewed or tested, nor can they be accepted.
So it's about patches that can't be applied due to lack of base tree information (due to the obvious guess not working). Not merely the lack of such information by itself.
- Eric
Quoted 9 lines · Eric Biggers
Quoted 6 lines
Quoted 3 lines
(for linux-next-20261020:)
base-commit:053966c344dbd346e71305f530e91ea77916189f
base-tree:git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.gitmasterAccording to commit msg which claims that without base information "nor can they be accepted. "
I actually wrote:
Quoted 8 lines
Many patches still don't include base tree information and can't be applied. Such patches can't be properly reviewed or tested, nor can they be accepted.
So it's about patches that can't be applied due to lack of base tree information (due to the obvious guess not working). Not merely the lack of such information by itself.
I have troubles in such case understanding that part of your commit msg. I maintain a few different trees, accept patches there and send pull requests to a few different upstream maintainers. I never had any problem with applying a patch due to missing base. IOW, having there a base tree information would not solve anything in "applied" or "accepted" part.
Best regards,
Krzysztof
Quoted 41 lines · Krzysztof Kozlowski
Quoted 31 lines · Eric Biggers
Quoted 23 lines · Krzysztof Kozlowski
Quoted 4 lines · Eric Biggers
Documentation/process/submitting-patches.rst +1
-3-Make sure that base commit is in an official maintainer/mainline tree -and not in some internal, accessible only to you tree - otherwise it -would be worthless. + If ``git format-patch`` with ``--base=auto`` (orDocumentation/process/submitting-patches.rst This is even more important for automated CI processes that attempt to · line 911
Quoted 10 lines
Documentation/process/submitting-patches.rst +10
-0+ ``format.useAutoBase=true``) can't detect a base commit, e.g. due to + the current branch having no upstream tracking branch, it exits with + an error. In such cases, pass an explicit base commit to ``--base`` + instead. This is also needed if git detects the wrong base commit, + such as when the upstream branch has local, unpublished commits. + +The base commit must be in a well-known public tree, such as the +subsystem development branch the patch is targeting. See +:ref:`obtain_a_current_source_tree`. Mainline or the latest linux-next +can also be acceptable bases, depending on the subsystem.I disagree, that's pointlessly too hard requirement.
For many of my contributions base is obvious and not needed to be explicitly defined. For all the patches I accept, answer is the same - base is either obvious or if not and patch does not apply, then the base does not matter.
Quoted 6 lines
Requiring it is just bureaucracy without actual benefit.
The only benefit would be if maintainer COULD change its base to apply some patch with odd base... but this cannot happen. Maintainer base is fixed - it's the HEAD of his development branch for given category of commits (e.g. DTS branch for SoC maintainers).
Quoted 8 lines
There are many use cases for applying patches besides the final patch acceptance, such as review (by anyone, not just a maintainer), testing, CI systems, etc.
HEAD of a branch is of course not fixed, and changes every time a patch gets applied. That's especially relevant when wanting to check out an old patch for any reason. Trying to guess a base commit based on the date and patch subject is a waste of time.
Quoted 7 lines
All these tools should just work on top of linux-next. Requiring people to add base like "next-20261021" or "tip-of-obvious-maintainer-tree" is pointless. I understand that base is helping, but helping and requiring an obvious information just do not go together.
So again: base has ZERO meaning to the maintainer process. It has meaning to tools, so fix the tools to work on known and obvious trees.
So what is your proposed algorithm to apply an arbitrary patch when there's no base-commit? Including any historical patch (from months/years ago), patches with dependencies, etc.
- Eric
Quoted 47 lines · Eric Biggers
Quoted 46 lines · Krzysztof Kozlowski
Quoted 31 lines · Eric Biggers
Quoted 23 lines · Krzysztof Kozlowski
Quoted 4 lines · Eric Biggers
Documentation/process/submitting-patches.rst +1
-3-Make sure that base commit is in an official maintainer/mainline tree -and not in some internal, accessible only to you tree - otherwise it -would be worthless. + If ``git format-patch`` with ``--base=auto`` (orDocumentation/process/submitting-patches.rst This is even more important for automated CI processes that attempt to · line 911
Quoted 10 lines
Documentation/process/submitting-patches.rst +10
-0+ ``format.useAutoBase=true``) can't detect a base commit, e.g. due to + the current branch having no upstream tracking branch, it exits with + an error. In such cases, pass an explicit base commit to ``--base`` + instead. This is also needed if git detects the wrong base commit, + such as when the upstream branch has local, unpublished commits. + +The base commit must be in a well-known public tree, such as the +subsystem development branch the patch is targeting. See +:ref:`obtain_a_current_source_tree`. Mainline or the latest linux-next +can also be acceptable bases, depending on the subsystem.I disagree, that's pointlessly too hard requirement.
For many of my contributions base is obvious and not needed to be explicitly defined. For all the patches I accept, answer is the same - base is either obvious or if not and patch does not apply, then the base does not matter.
Quoted 6 lines
Requiring it is just bureaucracy without actual benefit.
The only benefit would be if maintainer COULD change its base to apply some patch with odd base... but this cannot happen. Maintainer base is fixed - it's the HEAD of his development branch for given category of commits (e.g. DTS branch for SoC maintainers).
Quoted 8 lines
There are many use cases for applying patches besides the final patch acceptance, such as review (by anyone, not just a maintainer), testing, CI systems, etc.
HEAD of a branch is of course not fixed, and changes every time a patch gets applied. That's especially relevant when wanting to check out an old patch for any reason. Trying to guess a base commit based on the date and patch subject is a waste of time.
All these tools should just work on top of linux-next. Requiring people to add base like "next-20261021" or "tip-of-obvious-maintainer-tree" is pointless. I understand that base is helping, but helping and requiring an obvious information just do not go together.
Quoted 4 lines
Quoted 2 lines
So again: base has ZERO meaning to the maintainer process. It has meaning to tools, so fix the tools to work on known and obvious trees.
So what is your proposed algorithm to apply an arbitrary patch when
Already provided that, so to recap:
Quoted 2 lines
there's no base-commit? Including any historical patch (from months/years ago), patches with dependencies, etc.
Dependency is something else, but for every other patch:
1. For testing/CI: you apply on top of next
2. Every other case the maintainer knows where to apply it, because it is his HEAD of next-branch.
I am repeating myself, but I really had no single problem of lack of knowledge where to apply a patch as a maintainer or reviewer of some subsystem, thus maybe I do not understand the actual problem you are experiencing.
Best regards,
Krzysztof
Jonathan Corbet
maintainerQuoted 11 lines · Krzysztof Kozlowski
For many of my contributions base is obvious and not needed to be explicitly defined. For all the patches I accept, answer is the same - base is either obvious or if not and patch does not apply, then the base does not matter.
Requiring it is just bureaucracy without actual benefit.
The only benefit would be if maintainer COULD change its base to apply some patch with odd base... but this cannot happen. Maintainer base is fixed - it's the HEAD of his development branch for given category of commits (e.g. DTS branch for SoC maintainers).
I fairly routinely get docs patches that don't apply to docs-next; when I'm in the mood, I'll try to figure what they *do* apply to, then cherry-pick them over. Base information would make that process easier, and even automatable.
Thanks,
jon
Quoted 15 lines · Krzysztof Kozlowski
Quoted 4 lines
Quoted 2 lines
So again: base has ZERO meaning to the maintainer process. It has meaning to tools, so fix the tools to work on known and obvious trees.
So what is your proposed algorithm to apply an arbitrary patch when
Already provided that, so to recap:
Quoted 2 lines
there's no base-commit? Including any historical patch (from months/years ago), patches with dependencies, etc.
Dependency is something else, but for every other patch:
1. For testing/CI: you apply on top of next
2. Every other case the maintainer knows where to apply it, because it is his HEAD of next-branch.
Quoted 4 lines
I am repeating myself, but I really had no single problem of lack of knowledge where to apply a patch as a maintainer or reviewer of some subsystem, thus maybe I do not understand the actual problem you are experiencing.
From my perspective, I don't really want to force contributors to manually provide the tree information, but it's helpful if tooling includes it automatically.
Specifically, I am working on a service that eager-builds git bundles for all submitted patch series -- the goal is to make it simple for CI systems to fetch patch submissions as bundles that are already applicable against mainline. Knowing which tree and commit the series is based on is really helpful when figuring this out.
-K
Quoted 6 lines · Konstantin Ryabitsev
Quoted 5 lines · Krzysztof Kozlowski
Dependency is something else, but for every other patch:
1. For testing/CI: you apply on top of next
2. Every other case the maintainer knows where to apply it, because it is his HEAD of next-branch.
Quoted 8 lines
Quoted 4 lines
I am repeating myself, but I really had no single problem of lack of knowledge where to apply a patch as a maintainer or reviewer of some subsystem, thus maybe I do not understand the actual problem you are experiencing.
From my perspective, I don't really want to force contributors to manually provide the tree information, but it's helpful if tooling includes it automatically.
Sure, I do not oppose this being helpful. I oppose this being a requirement and that was the impression I got from this patch.
Quoted 6 lines
Specifically, I am working on a service that eager-builds git bundles for all submitted patch series -- the goal is to make it simple for CI systems to fetch patch submissions as bundles that are already applicable against mainline. Knowing which tree and commit the series is based on is really helpful when figuring this out.
This has limitations you will not be able to solve. For example, around SoC code (ARM, ARM64, RISC-V) are often combination of minimum two subsystems:
1. Driver code + Devicetree bindings, being picked up by driver maintainer, e.g. drivers/clock/ or drivers/reset/
2. DTS (arch/*/boot/dts) being picked up by SoC platform maintainer who later sends it to SoC folks (Arnd Bergmann and folks).
Such patchsets by definition target independent trees, thus the only reasonable base to fully test it or even apply it is the linux-next. Contributors would not be able to provide base-commit different than linux-next, thus that information is redundant - you can just assume it is linux-next.
And if by "tree and commit the series is based on" you meant maintainer tree, excluding linux-next, then that information could not be even provided, unless patchset is split.
Best regards,
Krzysztof
Quoted 14 lines · Jonathan Corbet
Quoted 11 lines · Krzysztof Kozlowski
For many of my contributions base is obvious and not needed to be explicitly defined. For all the patches I accept, answer is the same - base is either obvious or if not and patch does not apply, then the base does not matter.
Requiring it is just bureaucracy without actual benefit.
The only benefit would be if maintainer COULD change its base to apply some patch with odd base... but this cannot happen. Maintainer base is fixed - it's the HEAD of his development branch for given category of commits (e.g. DTS branch for SoC maintainers).
Quoted 5 lines
I fairly routinely get docs patches that don't apply to docs-next; when I'm in the mood, I'll try to figure what they *do* apply to, then cherry-pick them over. Base information would make that process easier, and even automatable.
Some maintainers do that indeed and I propose not to. Every two months I see one of my or other folks around my area patch which is being changed in incorrect way between mailing list and Git. Change is done because:
1. Patch did not apply cleanly (a lot of simultaneous work, so base is obviously old the moment the maintainer applies such patch)
2. Maintainer tried to resolve that by applying to the correct base (so followed your process) and then did git rebase or cherry pick to his final development branch.
3. Maintainer is overloaded and has no time to investigate whether rebase/cherry-pick from above is truly correct, except building the code, so every two months result of such rebase is wrong.
This is a real issue because it is very difficult to spot - your commit is applied, but you never verify whether is applied THE SAME way and maintainer thinks everything was applied cleanly.
If (1) happens and patch does not apply, the solution is to ask the contributor to rebase.
So sorry, but the proper base rather encourages risky patch merging/rebasing, instead of pushing the rebase problem to the person actually knowing the patch and having hardware to validate it.
Best regards,
Krzysztof
Quoted 63 lines · Krzysztof Kozlowski
Quoted 47 lines · Eric Biggers
Quoted 46 lines · Krzysztof Kozlowski
Quoted 31 lines · Eric Biggers
Quoted 23 lines · Krzysztof Kozlowski
Quoted 4 lines · Eric Biggers
Documentation/process/submitting-patches.rst +1
-3-Make sure that base commit is in an official maintainer/mainline tree -and not in some internal, accessible only to you tree - otherwise it -would be worthless. + If ``git format-patch`` with ``--base=auto`` (orDocumentation/process/submitting-patches.rst This is even more important for automated CI processes that attempt to · line 911
Quoted 10 lines
Documentation/process/submitting-patches.rst +10
-0+ ``format.useAutoBase=true``) can't detect a base commit, e.g. due to + the current branch having no upstream tracking branch, it exits with + an error. In such cases, pass an explicit base commit to ``--base`` + instead. This is also needed if git detects the wrong base commit, + such as when the upstream branch has local, unpublished commits. + +The base commit must be in a well-known public tree, such as the +subsystem development branch the patch is targeting. See +:ref:`obtain_a_current_source_tree`. Mainline or the latest linux-next +can also be acceptable bases, depending on the subsystem.I disagree, that's pointlessly too hard requirement.
For many of my contributions base is obvious and not needed to be explicitly defined. For all the patches I accept, answer is the same - base is either obvious or if not and patch does not apply, then the base does not matter.
Quoted 6 lines
Requiring it is just bureaucracy without actual benefit.
The only benefit would be if maintainer COULD change its base to apply some patch with odd base... but this cannot happen. Maintainer base is fixed - it's the HEAD of his development branch for given category of commits (e.g. DTS branch for SoC maintainers).
Quoted 8 lines
There are many use cases for applying patches besides the final patch acceptance, such as review (by anyone, not just a maintainer), testing, CI systems, etc.
HEAD of a branch is of course not fixed, and changes every time a patch gets applied. That's especially relevant when wanting to check out an old patch for any reason. Trying to guess a base commit based on the date and patch subject is a waste of time.
All these tools should just work on top of linux-next. Requiring people to add base like "next-20261021" or "tip-of-obvious-maintainer-tree" is pointless. I understand that base is helping, but helping and requiring an obvious information just do not go together.
Quoted 4 lines
Quoted 2 lines
So again: base has ZERO meaning to the maintainer process. It has meaning to tools, so fix the tools to work on known and obvious trees.
So what is your proposed algorithm to apply an arbitrary patch when
Already provided that, so to recap:
Quoted 2 lines
there's no base-commit? Including any historical patch (from months/years ago), patches with dependencies, etc.
Dependency is something else, but for every other patch:
1. For testing/CI: you apply on top of next
2. Every other case the maintainer knows where to apply it, because it is his HEAD of next-branch.
Quoted 4 lines
I am repeating myself, but I really had no single problem of lack of knowledge where to apply a patch as a maintainer or reviewer of some subsystem, thus maybe I do not understand the actual problem you are experiencing.
When I review patches, I often need to apply them to a tree, mainly to see the context, but sometimes also to test them. I have encountered many cases where the patch wouldn't apply on the current for-next branch of the relevant subsystem. That's often because the patch had dependencies. When I'm lucky they are listed manually in the cover letter with a link to a branch, but that's far from being the common case. I then have to ask the submitter to provide a branch, or enough information to recreate a branch. Having base information (base-commit, prerequisite-patch-id, and possibly base-tree) would save me quite some time.
I understand your concern about maintainers cherry-picking and sometimes introducing issues as a result. In that case I also prefer asking the submitter to rebase, retest, and resubmit. That's not what I want to use base information for, in my case it helps with the review process.
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 7 lines · Krzysztof Kozlowski
Quoted 5 lines
Specifically, I am working on a service that eager-builds git bundles for all submitted patch series -- the goal is to make it simple for CI systems to fetch patch submissions as bundles that are already applicable against mainline. Knowing which tree and commit the series is based on is really helpful when figuring this out.
This has limitations you will not be able to solve.
Oh, I am painfully aware of this -- but hopefully we'll hit most of the standard cases. The upside of us doing it is that we have All The Objects (as long as they have been pushed to our repos or the repos we mirror), so we should be able to figure out the ancestry, hopefully. The base-tree info is mostly useful for us to figure out the contributor's intent.
The service is still early in design stages and won't really be available for a while yet -- but hopefully once it is, the other CI systems will be able to benefit from us pre-solving the applicability so everyone doesn't have to do it over and over on their own.
-K
Quoted 26 lines · Laurent Pinchart
Quoted 9 lines · Krzysztof Kozlowski
Quoted 3 lines
there's no base-commit? Including any historical patch (from months/years ago), patches with dependencies, etc.
Dependency is something else, but for every other patch:
1. For testing/CI: you apply on top of next
2. Every other case the maintainer knows where to apply it, because it is his HEAD of next-branch.Quoted 4 lines
I am repeating myself, but I really had no single problem of lack of knowledge where to apply a patch as a maintainer or reviewer of some subsystem, thus maybe I do not understand the actual problem you are experiencing.
When I review patches, I often need to apply them to a tree, mainly to see the context, but sometimes also to test them. I have encountered many cases where the patch wouldn't apply on the current for-next branch of the relevant subsystem. That's often because the patch had dependencies. When I'm lucky they are listed manually in the cover letter with a link to a branch, but that's far from being the common case. I then have to ask the submitter to provide a branch, or enough information to recreate a branch. Having base information (base-commit, prerequisite-patch-id, and possibly base-tree) would save me quite some time.
Quoted 4 lines
I understand your concern about maintainers cherry-picking and sometimes introducing issues as a result. In that case I also prefer asking the submitter to rebase, retest, and resubmit. That's not what I want to use base information for, in my case it helps with the review process.
That's valid and for 95% (guessing the number...) of cases will be solved by having linux-next as a base, thus requiring the base information is redundant. It's just linux-next.
When patchset does NOT apply on linux-next or maintainer tree is non-obvious, the base should be provided, but that is only "if -> should". I think the proposal here is a bit different.
Best regards,
Krzysztof
Quoted 27 lines · Krzysztof Kozlowski
Quoted 26 lines · Laurent Pinchart
Quoted 9 lines · Krzysztof Kozlowski
Quoted 3 lines
there's no base-commit? Including any historical patch (from months/years ago), patches with dependencies, etc.
Dependency is something else, but for every other patch:
1. For testing/CI: you apply on top of next
2. Every other case the maintainer knows where to apply it, because it is his HEAD of next-branch.Quoted 4 lines
I am repeating myself, but I really had no single problem of lack of knowledge where to apply a patch as a maintainer or reviewer of some subsystem, thus maybe I do not understand the actual problem you are experiencing.
When I review patches, I often need to apply them to a tree, mainly to see the context, but sometimes also to test them. I have encountered many cases where the patch wouldn't apply on the current for-next branch of the relevant subsystem. That's often because the patch had dependencies. When I'm lucky they are listed manually in the cover letter with a link to a branch, but that's far from being the common case. I then have to ask the submitter to provide a branch, or enough information to recreate a branch. Having base information (base-commit, prerequisite-patch-id, and possibly base-tree) would save me quite some time.
Quoted 8 lines
Quoted 4 lines
I understand your concern about maintainers cherry-picking and sometimes introducing issues as a result. In that case I also prefer asking the submitter to rebase, retest, and resubmit. That's not what I want to use base information for, in my case it helps with the review process.
That's valid and for 95% (guessing the number...) of cases will be solved by having linux-next as a base, thus requiring the base information is redundant. It's just linux-next.
linux-next changes every day, so "It's just linux-next" is ambiguous.
Without base-commit, the workaround ends up being to use the date the patch was sent and various other information to try to guess a base commit. That's time-consuming and unreliable.
- Eric
Quoted 37 lines · Eric Biggers
Quoted 27 lines · Krzysztof Kozlowski
Quoted 26 lines · Laurent Pinchart
Quoted 9 lines · Krzysztof Kozlowski
Quoted 3 lines
there's no base-commit? Including any historical patch (from months/years ago), patches with dependencies, etc.
Dependency is something else, but for every other patch:
1. For testing/CI: you apply on top of next
2. Every other case the maintainer knows where to apply it, because it is his HEAD of next-branch.Quoted 4 lines
I am repeating myself, but I really had no single problem of lack of knowledge where to apply a patch as a maintainer or reviewer of some subsystem, thus maybe I do not understand the actual problem you are experiencing.
When I review patches, I often need to apply them to a tree, mainly to see the context, but sometimes also to test them. I have encountered many cases where the patch wouldn't apply on the current for-next branch of the relevant subsystem. That's often because the patch had dependencies. When I'm lucky they are listed manually in the cover letter with a link to a branch, but that's far from being the common case. I then have to ask the submitter to provide a branch, or enough information to recreate a branch. Having base information (base-commit, prerequisite-patch-id, and possibly base-tree) would save me quite some time.
Quoted 8 lines
Quoted 4 lines
I understand your concern about maintainers cherry-picking and sometimes introducing issues as a result. In that case I also prefer asking the submitter to rebase, retest, and resubmit. That's not what I want to use base information for, in my case it helps with the review process.
That's valid and for 95% (guessing the number...) of cases will be solved by having linux-next as a base, thus requiring the base information is redundant. It's just linux-next.
Quoted 5 lines
linux-next changes every day, so "It's just linux-next" is ambiguous.
Without base-commit, the workaround ends up being to use the date the patch was sent and various other information to try to guess a base commit. That's time-consuming and unreliable.
No, you just apply to the latest next. You don't guess. We speak about the case of reviewer, so person working with the kernel, thus probably having not-so-old linux-next available. If the next use as base is old it won't help you at all, because you might not even have it in your tree.
Best regards,
Krzysztof
Quoted 40 lines · Krzysztof Kozlowski
Quoted 39 lines · Eric Biggers
Quoted 27 lines · Krzysztof Kozlowski
Quoted 26 lines · Laurent Pinchart
Quoted 9 lines · Krzysztof Kozlowski
Quoted 3 lines
there's no base-commit? Including any historical patch (from months/years ago), patches with dependencies, etc.
Dependency is something else, but for every other patch:
1. For testing/CI: you apply on top of next
2. Every other case the maintainer knows where to apply it, because it is his HEAD of next-branch.Quoted 4 lines
I am repeating myself, but I really had no single problem of lack of knowledge where to apply a patch as a maintainer or reviewer of some subsystem, thus maybe I do not understand the actual problem you are experiencing.
When I review patches, I often need to apply them to a tree, mainly to see the context, but sometimes also to test them. I have encountered many cases where the patch wouldn't apply on the current for-next branch of the relevant subsystem. That's often because the patch had dependencies. When I'm lucky they are listed manually in the cover letter with a link to a branch, but that's far from being the common case. I then have to ask the submitter to provide a branch, or enough information to recreate a branch. Having base information (base-commit, prerequisite-patch-id, and possibly base-tree) would save me quite some time.
Quoted 8 lines
Quoted 4 lines
I understand your concern about maintainers cherry-picking and sometimes introducing issues as a result. In that case I also prefer asking the submitter to rebase, retest, and resubmit. That's not what I want to use base information for, in my case it helps with the review process.
That's valid and for 95% (guessing the number...) of cases will be solved by having linux-next as a base, thus requiring the base information is redundant. It's just linux-next.
linux-next changes every day, so "It's just linux-next" is ambiguous.
Quoted 8 lines
Quoted 3 lines
Without base-commit, the workaround ends up being to use the date the patch was sent and various other information to try to guess a base commit. That's time-consuming and unreliable.
No, you just apply to the latest next. You don't guess. We speak about the case of reviewer, so person working with the kernel, thus probably having not-so-old linux-next available. If the next use as base is old it won't help you at all, because you might not even have it in your tree.
I don't test on linux-next, that causes way too much churn. I test patches I review on top of their respective subsystem's tree, as that's where they will eventually be applied.
Signature · 3 lines
Regards, Laurent Pinchart
Hi Krzysztof,
Quoted 36 lines · Krzysztof Kozlowski
Quoted 14 lines · Jonathan Corbet
Quoted 11 lines · Krzysztof Kozlowski
For many of my contributions base is obvious and not needed to be explicitly defined. For all the patches I accept, answer is the same - base is either obvious or if not and patch does not apply, then the base does not matter.
Requiring it is just bureaucracy without actual benefit.
The only benefit would be if maintainer COULD change its base to apply some patch with odd base... but this cannot happen. Maintainer base is fixed - it's the HEAD of his development branch for given category of commits (e.g. DTS branch for SoC maintainers).
Quoted 5 lines
I fairly routinely get docs patches that don't apply to docs-next; when I'm in the mood, I'll try to figure what they *do* apply to, then cherry-pick them over. Base information would make that process easier, and even automatable.
Some maintainers do that indeed and I propose not to. Every two months I see one of my or other folks around my area patch which is being changed in incorrect way between mailing list and Git. Change is done because:
1. Patch did not apply cleanly (a lot of simultaneous work, so base is obviously old the moment the maintainer applies such patch)
2. Maintainer tried to resolve that by applying to the correct base (so followed your process) and then did git rebase or cherry pick to his final development branch.
3. Maintainer is overloaded and has no time to investigate whether rebase/cherry-pick from above is truly correct, except building the code, so every two months result of such rebase is wrong.
Quoted 6 lines
This is a real issue because it is very difficult to spot - your commit is applied, but you never verify whether is applied THE SAME way and maintainer thinks everything was applied cleanly.
If (1) happens and patch does not apply, the solution is to ask the contributor to rebase.
This happens a lot in DTS-enablement patches: multiple people are working on different devices for the same SoC/board, so half of their patches insert new device nodes at the same conflicting location. Perhaps we can teach to git how to handle DTS addition conflicts?
So your solution is that I apply one new patch every day and publish the result, and ask all other N-1 series to be rebased? Obviously this not only applies to queuing patches, but also to applying patches for build/run testing during review?
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Quoted 8 lines · Geert Uytterhoeven
Quoted 7 lines
This is a real issue because it is very difficult to spot - your commit is applied, but you never verify whether is applied THE SAME way and maintainer thinks everything was applied cleanly.
If (1) happens and patch does not apply, the solution is to ask the contributor to rebase.
Quoted 6 lines
This happens a lot in DTS-enablement patches: multiple people are working on different devices for the same SoC/board, so half of their patches insert new device nodes at the same conflicting location. Perhaps we can teach to git how to handle DTS addition conflicts?
So your solution is that I apply one new patch every day and publish
We speak about special cases, where there is a conflict thus the patch does not apply and base information could the maintainer rebase the patch. Only this case.
Quoted 3 lines
the result, and ask all other N-1 series to be rebased? Obviously this not only applies to queuing patches, but also to applying patches for build/run testing during review?
Unfortunately yes, because every other option I know, so maintainer doing rebases, is error-prone as I see every two months. If you assume that maintainer can be trusted in a way that they will do the rebase correctly, then well, welcome to burnout world were we barely have time to go through inbox, not even thinking about doing this diligently.
If we had git-forge workflow, then this (contributor need to rebase till there is no conflict) would be even an obvious requirement enforced by the forge.
Best regards,
Krzysztof
Quoted 32 lines · Krzysztof Kozlowski
Quoted 26 lines · Laurent Pinchart
Quoted 9 lines · Krzysztof Kozlowski
Quoted 3 lines
there's no base-commit? Including any historical patch (from months/years ago), patches with dependencies, etc.
Dependency is something else, but for every other patch:
1. For testing/CI: you apply on top of next
2. Every other case the maintainer knows where to apply it, because it is his HEAD of next-branch.Quoted 4 lines
I am repeating myself, but I really had no single problem of lack of knowledge where to apply a patch as a maintainer or reviewer of some subsystem, thus maybe I do not understand the actual problem you are experiencing.
When I review patches, I often need to apply them to a tree, mainly to see the context, but sometimes also to test them. I have encountered many cases where the patch wouldn't apply on the current for-next branch of the relevant subsystem. That's often because the patch had dependencies. When I'm lucky they are listed manually in the cover letter with a link to a branch, but that's far from being the common case. I then have to ask the submitter to provide a branch, or enough information to recreate a branch. Having base information (base-commit, prerequisite-patch-id, and possibly base-tree) would save me quite some time.
Quoted 4 lines
I understand your concern about maintainers cherry-picking and sometimes introducing issues as a result. In that case I also prefer asking the submitter to rebase, retest, and resubmit. That's not what I want to use base information for, in my case it helps with the review process.
Quoted 7 lines
That's valid and for 95% (guessing the number...) of cases will be solved by having linux-next as a base, thus requiring the base information is redundant. It's just linux-next.
When patchset does NOT apply on linux-next or maintainer tree is non-obvious, the base should be provided, but that is only "if -> should". I think the proposal here is a bit different.
What's the downside though ? As git can easily provide the base information once configured to do so, what's the downside of asking contributors to include it ?
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 5 lines · Laurent Pinchart
Quoted 4 lines · Krzysztof Kozlowski
That's valid and for 95% (guessing the number...) of cases will be solved by having linux-next as a base, thus requiring the base information is redundant. It's just linux-next.
Quoted 7 lines
Quoted 3 lines
When patchset does NOT apply on linux-next or maintainer tree is non-obvious, the base should be provided, but that is only "if -> should". I think the proposal here is a bit different.
What's the downside though ? As git can easily provide the base information once configured to do so, what's the downside of asking contributors to include it ?
For me the downside is that if you require it, half or more of my patches would be rejected and I would need to add unnecessary step to remember. Since this step is pointless - it would be linux-next (assuming in the first place that this is what the author wanted here!)
- it is a waste of time for me and potential resubmit of series, just to fulfill requirement which brings no benefits. So I have downside and I see no upside for my case, when you require the base.
This might be affecting others as well, but now speaking about my workflow - I have a lot of independent cleanups, which I stack on top of each other, sometimes series, sometimes not, but stacking is important so when I run make W=1 it passes.
What's more important, I reject the entire reasoning/cause of this change, which claimed you cannot review and therefore accept such patches. It's simply not true.
So please come with proper reasoning and then maybe even it would be fine to require the tag. But if reasoning is not correct, changing policy is not right.
Best regards,
Krzysztof
Quoted 8 lines · Krzysztof Kozlowski
For me the downside is that if you require it, half or more of my patches would be rejected and I would need to add unnecessary step to remember. Since this step is pointless - it would be linux-next (assuming in the first place that this is what the author wanted here!)
- it is a waste of time for me and potential resubmit of series, just to fulfill requirement which brings no benefits. So I have downside and I see no upside for my case, when you require the base.
Quoted 4 lines
This might be affecting others as well, but now speaking about my workflow - I have a lot of independent cleanups, which I stack on top of each other, sometimes series, sometimes not, but stacking is important so when I run
make W=1it passes.
That's super common in platform enablement scenarios as well, for test purposes people are often working on top of a base that's got a pile of other stuff that they need to get the platform running but is off topic for the series in question. You can do something like manually override the base but that tends to bitrot which can lead to other issues, and if you forget to override it people can get upset that you've given them a base they can't find.
It's definitely nice if people can include their base commit info but it can be more trouble than it's worth.
Hi Laurent,
Quoted 37 lines · Laurent Pinchart
Quoted 36 lines · Krzysztof Kozlowski
Quoted 26 lines · Laurent Pinchart
Quoted 9 lines · Krzysztof Kozlowski
Quoted 3 lines
there's no base-commit? Including any historical patch (from months/years ago), patches with dependencies, etc.
Dependency is something else, but for every other patch:
1. For testing/CI: you apply on top of next
2. Every other case the maintainer knows where to apply it, because it is his HEAD of next-branch.Quoted 4 lines
I am repeating myself, but I really had no single problem of lack of knowledge where to apply a patch as a maintainer or reviewer of some subsystem, thus maybe I do not understand the actual problem you are experiencing.
When I review patches, I often need to apply them to a tree, mainly to see the context, but sometimes also to test them. I have encountered many cases where the patch wouldn't apply on the current for-next branch of the relevant subsystem. That's often because the patch had dependencies. When I'm lucky they are listed manually in the cover letter with a link to a branch, but that's far from being the common case. I then have to ask the submitter to provide a branch, or enough information to recreate a branch. Having base information (base-commit, prerequisite-patch-id, and possibly base-tree) would save me quite some time.
Quoted 4 lines
I understand your concern about maintainers cherry-picking and sometimes introducing issues as a result. In that case I also prefer asking the submitter to rebase, retest, and resubmit. That's not what I want to use base information for, in my case it helps with the review process.
That's valid and for 95% (guessing the number...) of cases will be solved by having linux-next as a base, thus requiring the base information is redundant. It's just linux-next.
Quoted 7 lines
Quoted 3 lines
When patchset does NOT apply on linux-next or maintainer tree is non-obvious, the base should be provided, but that is only "if -> should". I think the proposal here is a bit different.
What's the downside though ? As git can easily provide the base information once configured to do so, what's the downside of asking contributors to include it ?
My base is usually not in your or anyone else's tree...
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Quoted 42 lines · Geert Uytterhoeven
Quoted 41 lines · Laurent Pinchart
Quoted 39 lines · Krzysztof Kozlowski
Quoted 26 lines · Laurent Pinchart
Quoted 9 lines · Krzysztof Kozlowski
Quoted 3 lines
there's no base-commit? Including any historical patch (from months/years ago), patches with dependencies, etc.
Dependency is something else, but for every other patch:
1. For testing/CI: you apply on top of next
2. Every other case the maintainer knows where to apply it, because it is his HEAD of next-branch.Quoted 4 lines
I am repeating myself, but I really had no single problem of lack of knowledge where to apply a patch as a maintainer or reviewer of some subsystem, thus maybe I do not understand the actual problem you are experiencing.
When I review patches, I often need to apply them to a tree, mainly to see the context, but sometimes also to test them. I have encountered many cases where the patch wouldn't apply on the current for-next branch of the relevant subsystem. That's often because the patch had dependencies. When I'm lucky they are listed manually in the cover letter with a link to a branch, but that's far from being the common case. I then have to ask the submitter to provide a branch, or enough information to recreate a branch. Having base information (base-commit, prerequisite-patch-id, and possibly base-tree) would save me quite some time.
Quoted 4 lines
I understand your concern about maintainers cherry-picking and sometimes introducing issues as a result. In that case I also prefer asking the submitter to rebase, retest, and resubmit. That's not what I want to use base information for, in my case it helps with the review process.
That's valid and for 95% (guessing the number...) of cases will be solved by having linux-next as a base, thus requiring the base information is redundant. It's just linux-next.
When patchset does NOT apply on linux-next or maintainer tree is non-obvious, the base should be provided, but that is only "if -> should". I think the proposal here is a bit different.
Quoted 5 lines
Quoted 3 lines
What's the downside though ? As git can easily provide the base information once configured to do so, what's the downside of asking contributors to include it ?
My base is usually not in your or anyone else's tree...
Hence the prerequisite-patch-id and base tree information. Or do you mean your base is not public at all, neither in the form of a branch pushed to a public tree, nor as prerequisite patches sent to a public list ?
Signature · 3 lines
Regards, Laurent Pinchart
Hi Laurent,
Quoted 46 lines · Laurent Pinchart
Quoted 45 lines · Geert Uytterhoeven
Quoted 43 lines · Laurent Pinchart
Quoted 31 lines · Krzysztof Kozlowski
Quoted 25 lines · Laurent Pinchart
Quoted 8 lines · Krzysztof Kozlowski
Quoted 2 lines
there's no base-commit? Including any historical patch (from months/years ago), patches with dependencies, etc.
Dependency is something else, but for every other patch:
1. For testing/CI: you apply on top of next
2. Every other case the maintainer knows where to apply it, because it is his HEAD of next-branch.Quoted 4 lines
I am repeating myself, but I really had no single problem of lack of knowledge where to apply a patch as a maintainer or reviewer of some subsystem, thus maybe I do not understand the actual problem you are experiencing.
When I review patches, I often need to apply them to a tree, mainly to see the context, but sometimes also to test them. I have encountered many cases where the patch wouldn't apply on the current for-next branch of the relevant subsystem. That's often because the patch had dependencies. When I'm lucky they are listed manually in the cover letter with a link to a branch, but that's far from being the common case. I then have to ask the submitter to provide a branch, or enough information to recreate a branch. Having base information (base-commit, prerequisite-patch-id, and possibly base-tree) would save me quite some time.
Quoted 4 lines
I understand your concern about maintainers cherry-picking and sometimes introducing issues as a result. In that case I also prefer asking the submitter to rebase, retest, and resubmit. That's not what I want to use base information for, in my case it helps with the review process.
Quoted 7 lines
That's valid and for 95% (guessing the number...) of cases will be solved by having linux-next as a base, thus requiring the base information is redundant. It's just linux-next.
When patchset does NOT apply on linux-next or maintainer tree is non-obvious, the base should be provided, but that is only "if -> should". I think the proposal here is a bit different.
What's the downside though ? As git can easily provide the base information once configured to do so, what's the downside of asking contributors to include it ?
Quoted 6 lines
Quoted 1 line
My base is usually not in your or anyone else's tree...
Hence the prerequisite-patch-id and base tree information. Or do you mean your base is not public at all, neither in the form of a branch pushed to a public tree, nor as prerequisite patches sent to a public list ?
Correct.
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Quoted 64 lines · Krzysztof Kozlowski
Quoted 47 lines · Eric Biggers
Quoted 46 lines · Krzysztof Kozlowski
Quoted 31 lines · Eric Biggers
Quoted 23 lines · Krzysztof Kozlowski
Quoted 4 lines · Eric Biggers
Documentation/process/submitting-patches.rst +1
-3-Make sure that base commit is in an official maintainer/mainline tree -and not in some internal, accessible only to you tree - otherwise it -would be worthless. + If ``git format-patch`` with ``--base=auto`` (orDocumentation/process/submitting-patches.rst This is even more important for automated CI processes that attempt to · line 911
Quoted 10 lines
Documentation/process/submitting-patches.rst +10
-0+ ``format.useAutoBase=true``) can't detect a base commit, e.g. due to + the current branch having no upstream tracking branch, it exits with + an error. In such cases, pass an explicit base commit to ``--base`` + instead. This is also needed if git detects the wrong base commit, + such as when the upstream branch has local, unpublished commits. + +The base commit must be in a well-known public tree, such as the +subsystem development branch the patch is targeting. See +:ref:`obtain_a_current_source_tree`. Mainline or the latest linux-next +can also be acceptable bases, depending on the subsystem.I disagree, that's pointlessly too hard requirement.
For many of my contributions base is obvious and not needed to be explicitly defined. For all the patches I accept, answer is the same - base is either obvious or if not and patch does not apply, then the base does not matter.
Quoted 6 lines
Requiring it is just bureaucracy without actual benefit.
The only benefit would be if maintainer COULD change its base to apply some patch with odd base... but this cannot happen. Maintainer base is fixed - it's the HEAD of his development branch for given category of commits (e.g. DTS branch for SoC maintainers).
Quoted 8 lines
There are many use cases for applying patches besides the final patch acceptance, such as review (by anyone, not just a maintainer), testing, CI systems, etc.
HEAD of a branch is of course not fixed, and changes every time a patch gets applied. That's especially relevant when wanting to check out an old patch for any reason. Trying to guess a base commit based on the date and patch subject is a waste of time.
All these tools should just work on top of linux-next. Requiring people to add base like "next-20261021" or "tip-of-obvious-maintainer-tree" is pointless. I understand that base is helping, but helping and requiring an obvious information just do not go together.
Quoted 4 lines
Quoted 2 lines
So again: base has ZERO meaning to the maintainer process. It has meaning to tools, so fix the tools to work on known and obvious trees.
So what is your proposed algorithm to apply an arbitrary patch when
Already provided that, so to recap:
Quoted 2 lines
there's no base-commit? Including any historical patch (from months/years ago), patches with dependencies, etc.
Dependency is something else, but for every other patch:
1. For testing/CI: you apply on top of next
2. Every other case the maintainer knows where to apply it, because it is his HEAD of next-branch.
Quoted 4 lines
I am repeating myself, but I really had no single problem of lack of knowledge where to apply a patch as a maintainer or reviewer of some subsystem, thus maybe I do not understand the actual problem you are experiencing.
Look at our DT PW. There are numerous patches that don't apply and then we silently don't test them at all. Here's one example[1] (3 actually as the whole series doesn't apply). The more base-commit tags, the better. If b4 can't apply it, then I do try just linux-next, but is that today's, yesterday's or 2 weeks ago? That still doesn't work sometimes.
Rob
Quoted 47 lines · Geert Uytterhoeven
Quoted 46 lines · Laurent Pinchart
Quoted 45 lines · Geert Uytterhoeven
Quoted 43 lines · Laurent Pinchart
Quoted 31 lines · Krzysztof Kozlowski
Quoted 25 lines · Laurent Pinchart
Quoted 8 lines · Krzysztof Kozlowski
Quoted 2 lines
there's no base-commit? Including any historical patch (from months/years ago), patches with dependencies, etc.
Dependency is something else, but for every other patch:
1. For testing/CI: you apply on top of next
2. Every other case the maintainer knows where to apply it, because it is his HEAD of next-branch.Quoted 4 lines
I am repeating myself, but I really had no single problem of lack of knowledge where to apply a patch as a maintainer or reviewer of some subsystem, thus maybe I do not understand the actual problem you are experiencing.
When I review patches, I often need to apply them to a tree, mainly to see the context, but sometimes also to test them. I have encountered many cases where the patch wouldn't apply on the current for-next branch of the relevant subsystem. That's often because the patch had dependencies. When I'm lucky they are listed manually in the cover letter with a link to a branch, but that's far from being the common case. I then have to ask the submitter to provide a branch, or enough information to recreate a branch. Having base information (base-commit, prerequisite-patch-id, and possibly base-tree) would save me quite some time.
Quoted 4 lines
I understand your concern about maintainers cherry-picking and sometimes introducing issues as a result. In that case I also prefer asking the submitter to rebase, retest, and resubmit. That's not what I want to use base information for, in my case it helps with the review process.
Quoted 7 lines
That's valid and for 95% (guessing the number...) of cases will be solved by having linux-next as a base, thus requiring the base information is redundant. It's just linux-next.
When patchset does NOT apply on linux-next or maintainer tree is non-obvious, the base should be provided, but that is only "if -> should". I think the proposal here is a bit different.
What's the downside though ? As git can easily provide the base information once configured to do so, what's the downside of asking contributors to include it ?
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
My base is usually not in your or anyone else's tree...
Hence the prerequisite-patch-id and base tree information. Or do you mean your base is not public at all, neither in the form of a branch pushed to a public tree, nor as prerequisite patches sent to a public list ?
Correct.
How am I supposed to review or apply something that depends on work that is not public ?
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 8 lines · Laurent Pinchart
Quoted 6 lines · Geert Uytterhoeven
Quoted 4 lines · Laurent Pinchart
Hence the prerequisite-patch-id and base tree information. Or do you mean your base is not public at all, neither in the form of a branch pushed to a public tree, nor as prerequisite patches sent to a public list ?
Quoted 4 lines
Quoted 1 line
Correct.
How am I supposed to review or apply something that depends on work that is not public ?
It depends a lot on what the base commit is doing, if it's directly relevant to the patch it's an issue but if it's unrelated work for platform enablement that's needed for testing the changes then it isn't so relevant. This isn't insurmountable, you can cherry pick the changes over to a clean branch or something, but there's new failure modes introduced by being explicit about the commit (the number of times I've had to unwind a series apply in b4 because it paid attention to an unsuitable sender specified base...).
Quoted 27 lines · Rob Herring
Quoted 21 lines · Krzysztof Kozlowski
Quoted 10 lines
Quoted 8 lines
All these tools should just work on top of linux-next. Requiring people to add base like "next-20261021" or "tip-of-obvious-maintainer-tree" is pointless. I understand that base is helping, but helping and requiring an obvious information just do not go together.
So again: base has ZERO meaning to the maintainer process. It has meaning to tools, so fix the tools to work on known and obvious trees.
So what is your proposed algorithm to apply an arbitrary patch when
Already provided that, so to recap:
Quoted 2 lines
there's no base-commit? Including any historical patch (from months/years ago), patches with dependencies, etc.
Dependency is something else, but for every other patch:
1. For testing/CI: you apply on top of next
2. Every other case the maintainer knows where to apply it, because it is his HEAD of next-branch.Quoted 4 lines
I am repeating myself, but I really had no single problem of lack of knowledge where to apply a patch as a maintainer or reviewer of some subsystem, thus maybe I do not understand the actual problem you are experiencing.
Quoted 6 lines
Look at our DT PW. There are numerous patches that don't apply and then we silently don't test them at all. Here's one example[1] (3 actually as the whole series doesn't apply). The more base-commit tags, the better. If b4 can't apply it, then I do try just linux-next, but is that today's, yesterday's or 2 weeks ago? That still doesn't work sometimes.
I have doubts that DT CI would know these mentioned bases, unless everyone develops on master, which is obviously not possible. It could work if CI has all possible next tags fetched, but then I argue that without base commit such CI could apply to closest linux-next tag by date.
Best regards,
Krzysztof
Hi Rob,
Quoted 64 lines · Rob Herring
Quoted 63 lines · Krzysztof Kozlowski
Quoted 47 lines · Eric Biggers
Quoted 46 lines · Krzysztof Kozlowski
Quoted 31 lines · Eric Biggers
Quoted 23 lines · Krzysztof Kozlowski
Quoted 4 lines · Eric Biggers
(quoted diff) +1
-3-Make sure that base commit is in an official maintainer/mainline tree -and not in some internal, accessible only to you tree - otherwise it -would be worthless. + If ``git format-patch`` with ``--base=auto`` (orReview
Quoted 10 lines
(quoted diff) +10
-0+ ``format.useAutoBase=true``) can't detect a base commit, e.g. due to + the current branch having no upstream tracking branch, it exits with + an error. In such cases, pass an explicit base commit to ``--base`` + instead. This is also needed if git detects the wrong base commit, + such as when the upstream branch has local, unpublished commits. + +The base commit must be in a well-known public tree, such as the +subsystem development branch the patch is targeting. See +:ref:`obtain_a_current_source_tree`. Mainline or the latest linux-next +can also be acceptable bases, depending on the subsystem.I disagree, that's pointlessly too hard requirement.
For many of my contributions base is obvious and not needed to be explicitly defined. For all the patches I accept, answer is the same - base is either obvious or if not and patch does not apply, then the base does not matter.
Quoted 6 lines
Requiring it is just bureaucracy without actual benefit.
The only benefit would be if maintainer COULD change its base to apply some patch with odd base... but this cannot happen. Maintainer base is fixed - it's the HEAD of his development branch for given category of commits (e.g. DTS branch for SoC maintainers).
Quoted 8 lines
There are many use cases for applying patches besides the final patch acceptance, such as review (by anyone, not just a maintainer), testing, CI systems, etc.
HEAD of a branch is of course not fixed, and changes every time a patch gets applied. That's especially relevant when wanting to check out an old patch for any reason. Trying to guess a base commit based on the date and patch subject is a waste of time.
All these tools should just work on top of linux-next. Requiring people to add base like "next-20261021" or "tip-of-obvious-maintainer-tree" is pointless. I understand that base is helping, but helping and requiring an obvious information just do not go together.
Quoted 4 lines
Quoted 2 lines
So again: base has ZERO meaning to the maintainer process. It has meaning to tools, so fix the tools to work on known and obvious trees.
So what is your proposed algorithm to apply an arbitrary patch when
Already provided that, so to recap:
Quoted 2 lines
there's no base-commit? Including any historical patch (from months/years ago), patches with dependencies, etc.
Dependency is something else, but for every other patch:
1. For testing/CI: you apply on top of next
2. Every other case the maintainer knows where to apply it, because it is his HEAD of next-branch.
Quoted 7 lines
Quoted 4 lines
I am repeating myself, but I really had no single problem of lack of knowledge where to apply a patch as a maintainer or reviewer of some subsystem, thus maybe I do not understand the actual problem you are experiencing.
Look at our DT PW. There are numerous patches that don't apply and then we silently don't test them at all. Here's one example[1] (3
That's a false positive, as the first two patches (the ones that really matter for you as DT maintainer) do apply to yesterday's linux-next ;-)
Quoted 1 line
actually as the whole series doesn't apply). The more base-commit
There are indeed patches in that series that cannot be applied, which is explained in the cover letter.
The problem boils down to how to present work that touches multiple target trees, and where some parts depend on other work that is not yet finished. Do you post it as single series, so people get an overview? Do you split it in multiple small series (which may still have interdependencies), so everybody looses context?
Quoted 1 line
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Quoted 35 lines · Krzysztof Kozlowski
Quoted 27 lines · Rob Herring
Quoted 21 lines · Krzysztof Kozlowski
Quoted 10 lines
Quoted 8 lines
All these tools should just work on top of linux-next. Requiring people to add base like "next-20261021" or "tip-of-obvious-maintainer-tree" is pointless. I understand that base is helping, but helping and requiring an obvious information just do not go together.
So again: base has ZERO meaning to the maintainer process. It has meaning to tools, so fix the tools to work on known and obvious trees.
So what is your proposed algorithm to apply an arbitrary patch when
Already provided that, so to recap:
Quoted 2 lines
there's no base-commit? Including any historical patch (from months/years ago), patches with dependencies, etc.
Dependency is something else, but for every other patch:
1. For testing/CI: you apply on top of next
2. Every other case the maintainer knows where to apply it, because it is his HEAD of next-branch.Quoted 4 lines
I am repeating myself, but I really had no single problem of lack of knowledge where to apply a patch as a maintainer or reviewer of some subsystem, thus maybe I do not understand the actual problem you are experiencing.
Quoted 6 lines
Look at our DT PW. There are numerous patches that don't apply and then we silently don't test them at all. Here's one example[1] (3 actually as the whole series doesn't apply). The more base-commit tags, the better. If b4 can't apply it, then I do try just linux-next, but is that today's, yesterday's or 2 weeks ago? That still doesn't work sometimes.
Quoted 4 lines
I have doubts that DT CI would know these mentioned bases, unless everyone develops on master, which is obviously not possible. It could work if CI has all possible next tags fetched, but then I argue that without base commit such CI could apply to closest linux-next tag by date.
I fetch the last 5 next trees or so. b4 will also try to guess the base, but that doesn't seem to work all that well. If this is "easy", then b4 should just work without issue, right?
Rob
Quoted 78 lines · Geert Uytterhoeven
Quoted 64 lines · Rob Herring
Quoted 63 lines · Krzysztof Kozlowski
Quoted 47 lines · Eric Biggers
Quoted 46 lines · Krzysztof Kozlowski
Quoted 31 lines · Eric Biggers
Quoted 23 lines · Krzysztof Kozlowski
Quoted 4 lines · Eric Biggers
(quoted diff) +1
-3-Make sure that base commit is in an official maintainer/mainline tree -and not in some internal, accessible only to you tree - otherwise it -would be worthless. + If ``git format-patch`` with ``--base=auto`` (orReview
Quoted 10 lines
(quoted diff) +10
-0+ ``format.useAutoBase=true``) can't detect a base commit, e.g. due to + the current branch having no upstream tracking branch, it exits with + an error. In such cases, pass an explicit base commit to ``--base`` + instead. This is also needed if git detects the wrong base commit, + such as when the upstream branch has local, unpublished commits. + +The base commit must be in a well-known public tree, such as the +subsystem development branch the patch is targeting. See +:ref:`obtain_a_current_source_tree`. Mainline or the latest linux-next +can also be acceptable bases, depending on the subsystem.I disagree, that's pointlessly too hard requirement.
For many of my contributions base is obvious and not needed to be explicitly defined. For all the patches I accept, answer is the same - base is either obvious or if not and patch does not apply, then the base does not matter.
Quoted 6 lines
Requiring it is just bureaucracy without actual benefit.
The only benefit would be if maintainer COULD change its base to apply some patch with odd base... but this cannot happen. Maintainer base is fixed - it's the HEAD of his development branch for given category of commits (e.g. DTS branch for SoC maintainers).
Quoted 8 lines
There are many use cases for applying patches besides the final patch acceptance, such as review (by anyone, not just a maintainer), testing, CI systems, etc.
HEAD of a branch is of course not fixed, and changes every time a patch gets applied. That's especially relevant when wanting to check out an old patch for any reason. Trying to guess a base commit based on the date and patch subject is a waste of time.
All these tools should just work on top of linux-next. Requiring people to add base like "next-20261021" or "tip-of-obvious-maintainer-tree" is pointless. I understand that base is helping, but helping and requiring an obvious information just do not go together.
Quoted 4 lines
Quoted 2 lines
So again: base has ZERO meaning to the maintainer process. It has meaning to tools, so fix the tools to work on known and obvious trees.
So what is your proposed algorithm to apply an arbitrary patch when
Already provided that, so to recap:
Quoted 2 lines
there's no base-commit? Including any historical patch (from months/years ago), patches with dependencies, etc.
Dependency is something else, but for every other patch:
1. For testing/CI: you apply on top of next
2. Every other case the maintainer knows where to apply it, because it is his HEAD of next-branch.Quoted 7 lines
Quoted 4 lines
I am repeating myself, but I really had no single problem of lack of knowledge where to apply a patch as a maintainer or reviewer of some subsystem, thus maybe I do not understand the actual problem you are experiencing.
Look at our DT PW. There are numerous patches that don't apply and then we silently don't test them at all. Here's one example[1] (3
That's a false positive, as the first two patches (the ones that really matter for you as DT maintainer) do apply to yesterday's linux-next ;-)
Quoted 1 line
actually as the whole series doesn't apply). The more base-commit
Quoted 8 lines
There are indeed patches in that series that cannot be applied, which is explained in the cover letter.
The problem boils down to how to present work that touches multiple target trees, and where some parts depend on other work that is not yet finished. Do you post it as single series, so people get an overview? Do you split it in multiple small series (which may still have interdependencies), so everybody looses context?
There's no one-size-fits-them-all solution to this problem. What I want in those cases is information provided by the person posting the patches about the dependencies and where to find them. I think there's value in specifying that information in a machine-parseable way.
Quoted 1 line
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 10 lines · Krzysztof Kozlowski
Quoted 9 lines · Laurent Pinchart
Quoted 7 lines · Krzysztof Kozlowski
That's valid and for 95% (guessing the number...) of cases will be solved by having linux-next as a base, thus requiring the base information is redundant. It's just linux-next.
When patchset does NOT apply on linux-next or maintainer tree is non-obvious, the base should be provided, but that is only "if -> should". I think the proposal here is a bit different.
Quoted 6 lines
Quoted 3 lines
What's the downside though ? As git can easily provide the base information once configured to do so, what's the downside of asking contributors to include it ?
For me the downside is that if you require it, half or more of my patches would be rejected
I don't think we want to automate rejection of patches that provide no base information, and certainly not as a first step. The goal as I see it is to encourage people to provide the information. It's a process that will take time.
Quoted 2 lines
and I would need to add unnecessary step to
remember.
It doesn't have to require manual work every time you send paches. format.useAutoBase in conjunction with specifying upstreams of branches helps.
Quoted 6 lines
Since this step is pointless - it would be linux-next (assuming in the first place that this is what the author wanted here!)
- it is a waste of time for me and potential resubmit of series, just to fulfill requirement which brings no benefits. So I have downside and I see no upside for my case, when you require the base.
Quoted 8 lines
This might be affecting others as well, but now speaking about my workflow - I have a lot of independent cleanups, which I stack on top of each other, sometimes series, sometimes not, but stacking is important so when I run
make W=1it passes.What's more important, I reject the entire reasoning/cause of this change, which claimed you cannot review and therefore accept such patches. It's simply not true.
That's not my claim.
Quoted 3 lines
So please come with proper reasoning and then maybe even it would be fine to require the tag. But if reasoning is not correct, changing policy is not right.
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 11 lines · Mark Brown
Quoted 10 lines · Laurent Pinchart
Quoted 8 lines · Geert Uytterhoeven
Quoted 5 lines · Laurent Pinchart
Hence the prerequisite-patch-id and base tree information. Or do you mean your base is not public at all, neither in the form of a branch pushed to a public tree, nor as prerequisite patches sent to a public list ?
Correct.
Quoted 7 lines
Quoted 2 lines
How am I supposed to review or apply something that depends on work that is not public ?
It depends a lot on what the base commit is doing, if it's directly relevant to the patch it's an issue but if it's unrelated work for platform enablement that's needed for testing the changes then it isn't so relevant.
Indeed. I was thinking about the case where the dependencies are relevant, but there can of course be patches at the bottom of the branch that are entirely unrelated.
Quoted 5 lines
This isn't insurmountable, you can cherry pick the
changes over to a clean branch or something, but there's new failure modes introduced by being explicit about the commit (the number of times I've had to unwind a series apply in b4 because it paid attention to an unsuitable sender specified base...).
I've seen that too. So far it has bothered me less than not having base information. With an unsuitable base I can apply the patches ignoring the base, while with missing base I have to ask the submitter. The latter interrupts review. Your mileage may vary though, depending on how often you hit either case.
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 15 lines · Laurent Pinchart
Quoted 14 lines · Krzysztof Kozlowski
Quoted 12 lines · Laurent Pinchart
Quoted 7 lines · Krzysztof Kozlowski
That's valid and for 95% (guessing the number...) of cases will be solved by having linux-next as a base, thus requiring the base information is redundant. It's just linux-next.
When patchset does NOT apply on linux-next or maintainer tree is non-obvious, the base should be provided, but that is only "if -> should". I think the proposal here is a bit different.
What's the downside though ? As git can easily provide the base information once configured to do so, what's the downside of asking contributors to include it ?
Quoted 7 lines
Quoted 2 lines
For me the downside is that if you require it, half or more of my patches would be rejected
I don't think we want to automate rejection of patches that provide no base information, and certainly not as a first step. The goal as I see it is to encourage people to provide the information. It's a process that will take time.
We already encourage that in current wording and b4 automatically provides that.
If you want to encourage, do not make it a requirement "with only rare exceptions".
Quoted 7 lines
Quoted 3 lines
and I would need to add unnecessary step to
remember.It doesn't have to require manual work every time you send paches. format.useAutoBase in conjunction with specifying upstreams of branches helps.
But then base would point nowhere... Upstream of my branches are my github branches, so I always know what is up2date against my github. Otherwise how do you track - with multi-machine and fully backed up repos - whether your local changes are updated against your backed up branch on github/forge?
Quoted 12 lines
Quoted 12 lines
Since this step is pointless - it would be linux-next (assuming in the first place that this is what the author wanted here!)
- it is a waste of time for me and potential resubmit of series, just to fulfill requirement which brings no benefits. So I have downside and I see no upside for my case, when you require the base.This might be affecting others as well, but now speaking about my workflow - I have a lot of independent cleanups, which I stack on top of each other, sometimes series, sometimes not, but stacking is important so when I run
make W=1it passes.
Quoted 5 lines
Quoted 3 lines
What's more important, I reject the entire reasoning/cause of this change, which claimed you cannot review and therefore accept such patches. It's simply not true.
That's not my claim.
That's the claim from commit msg. And wording should rather be "which claimed one cannot review".
Best regards,
Krzysztof
Quoted 8 lines · Laurent Pinchart
Quoted 5 lines · Mark Brown
This isn't insurmountable, you can cherry pick the
changes over to a clean branch or something, but there's new failure modes introduced by being explicit about the commit (the number of times I've had to unwind a series apply in b4 because it paid attention to an unsuitable sender specified base...).
Quoted 5 lines
I've seen that too. So far it has bothered me less than not having base information. With an unsuitable base I can apply the patches ignoring the base, while with missing base I have to ask the submitter. The latter interrupts review. Your mileage may vary though, depending on how often you hit either case.
Some of it is a consequence of how I handle these situations - if I can't work out how to apply the patch against something I'm likely to apply the patch to I'll just ask the submitter to rebase before I get terribly far into things, if I get as far as pulling the patch in before I notice b4 used a weird base (usually picked up from the submitter) and I didn't override it then that's pretty cumbersome to unwind.
Quoted 11 lines · Krzysztof Kozlowski
Quoted 11 lines
Quoted 11 lines
Since this step is pointless - it would be linux-next (assuming in the first place that this is what the author wanted here!)
- it is a waste of time for me and potential resubmit of series, just to fulfill requirement which brings no benefits. So I have downside and I see no upside for my case, when you require the base.This might be affecting others as well, but now speaking about my workflow - I have a lot of independent cleanups, which I stack on top of each other, sometimes series, sometimes not, but stacking is important so when I run
make W=1it passes.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
What's more important, I reject the entire reasoning/cause of this change, which claimed you cannot review and therefore accept such patches. It's simply not true.
That's not my claim.
That's the claim from commit msg. And wording should rather be "which claimed one cannot review".
Emailed patches include only 3 lines of context by default. That's simply not enough for a proper review in most cases. For a proper review patches usually have to be applied, which often fails especially if it's an old patch. (Caveat: as usual, the frequency of this varies by subsystem. So some people encounter them more than others. Just because you might not experience this much doesn't mean others don't...)
base-commit (and optional prerequisite-patch-id) can prevent that in most cases. That's the point. And it helps for applying patches for any other reason, like testing, or resuming work on on old patchset.
It seems like your concern is that people would bureaucratically ignore patches without base-commit even when they apply cleanly to "something obvious"? That is not what I intended for this at all. This is all about getting more patches to include base tree information.
I also don't think your interpretation is consistent with the actual commit message or diff of this patch. Regardless, I'd also be glad to clarify the wording. Do you have any specific wording suggestions?
- Eric
Quoted 10 lines · Laurent Pinchart
Quoted 5 lines
The problem boils down to how to present work that touches multiple target trees, and where some parts depend on other work that is not yet finished. Do you post it as single series, so people get an overview? Do you split it in multiple small series (which may still have interdependencies), so everybody looses context?
There's no one-size-fits-them-all solution to this problem. What I want in those cases is information provided by the person posting the patches about the dependencies and where to find them. I think there's value in specifying that information in a machine-parseable way.
The problem is that "one size fits all" and "machine-parseable way" are in tension with one another. One approach might be that the patche series fragments might be sent to different subsystem mailing lists and reiewers, but the cover letter might include a pointer to a unified git branch which has all of the patches touching all of the different pieces.
Another approach might be to post it as a single series, but different mailing lists and reviewers get cc'ed on the various patches in that series --- and everyone gets cc'ed on the cover letter which also has a pointer to the unified git branch.
A lot of this really depends on whether you are asking for reviews, or whether you are asking people to apply the patch series in their subsystem trees. In the case where there are a large number of interdependencies, they probably can't do that via patch series anyway, and it might be easier just to get relevant ack'ed by and then send to Linus with an explanation that you've gotten acks from all of the relevant reviewers.
In truth, this case is actually pretty rare. The more common case is where there is a single set of changes that multiple patch series might depend upon. For example, there might be an set of iomap changes which will go on one branch, and then various file systems (xfs, ext4, btrfs, etc.) might pull in that common dependency branch with the iomap changes, and then put their ext4 changes on top of those.
In that case, what's important is not just the base commit id, but an explanation of where to find that base commit. Normally that just goes in the cover letter, in human readable form, because I don't think we have a lot of automation that tries to deal with that, as a subsystem maintianer, reading the cover letter is just fine from my perspective. But if someone wants to propsoe extending the base commit with a repo and branch or tag where the commit can be found, I guess we could do that.
- Ted
Quoted 12 lines · Theodore Tso
Quoted 10 lines · Laurent Pinchart
Quoted 5 lines
The problem boils down to how to present work that touches multiple target trees, and where some parts depend on other work that is not yet finished. Do you post it as single series, so people get an overview? Do you split it in multiple small series (which may still have interdependencies), so everybody looses context?
There's no one-size-fits-them-all solution to this problem. What I want in those cases is information provided by the person posting the patches about the dependencies and where to find them. I think there's value in specifying that information in a machine-parseable way.
Quoted 6 lines
The problem is that "one size fits all" and "machine-parseable way" are in tension with one another. One approach might be that the patche series fragments might be sent to different subsystem mailing lists and reiewers, but the cover letter might include a pointer to a unified git branch which has all of the patches touching all of the different pieces.
b4 can already handle that if the dependencies are listed.
Quoted 4 lines
Another approach might be to post it as a single series, but different mailing lists and reviewers get cc'ed on the various patches in that series --- and everyone gets cc'ed on the cover letter which also has a pointer to the unified git branch.
b4 can handle that too as long as all the patches are in lore.
Quoted 16 lines
A lot of this really depends on whether you are asking for reviews, or whether you are asking people to apply the patch series in their subsystem trees. In the case where there are a large number of interdependencies, they probably can't do that via patch series anyway, and it might be easier just to get relevant ack'ed by and then send to Linus with an explanation that you've gotten acks from all of the relevant reviewers.
In truth, this case is actually pretty rare. The more common case is where there is a single set of changes that multiple patch series might depend upon. For example, there might be an set of iomap changes which will go on one branch, and then various file systems (xfs, ext4, btrfs, etc.) might pull in that common dependency branch with the iomap changes, and then put their ext4 changes on top of those.
Quoted 8 lines
In that case, what's important is not just the base commit id, but an explanation of where to find that base commit. Normally that just goes in the cover letter, in human readable form, because I don't think we have a lot of automation that tries to deal with that, as a subsystem maintianer, reading the cover letter is just fine from my perspective. But if someone wants to propsoe extending the base commit with a repo and branch or tag where the commit can be found, I guess we could do that.
That would be nice as it shifts the whole problem of applying a series to the submitter.
However, I think there would be new issues. The base could be old or a stable tree. The base could contain a commit to disable all those annoying warnings or disable all the failing tests which then affects any testing we run on the series. But all of that is probably much more rare than the number of series that don't apply today.
Rob