On Friday, December 12, 2025 at 6:34:20 PM UTC+1 Kaz Kylheku wrote:I've researched this topic a bit and found some past discussions, about it.The situation is: using Gerrit for producing local patches that are rebased against a moving upstream, on a daily bases.I read that common practice involves abandoning the local review once it has been upstreamed, scrubbed of its Change-Id and pulled down again.The problem is that the change has to be submitted locally; the local team needs the change to be merged so that everyone picks it up. It could be weeks or months before it is upstreamed, and in fact some changes aren never upstreamed.What happens to a Submitted Gerrit item when the submitted patchset's commit is reflected back from upstream without its Change-Id?In the process of removing the change-id you create a new commit and without the change-id Gerrit won't recognize that the new commit is a version of the existing change.
I don't think I understand the workflow you are describing as it doesn't make sense to me in git-context.
Since you are working with change-ids locally and without change-ids upstream they are two different git DAGs.
If you only care about the working tree in git you could keep a "local" branch were you create changes and merge them at your own pace while pulling upstream into "upstream" branch that you regularly merge into "local" (but that seems like a lot of work.
Don't know if the situation would be improved with the ideas from jujutsu about having the change-id as a commit-header instead of as a footer?
Perhaps upstream wouldn't notice the change-id header and Gerrit would recognize the commit as part of an existing change.
Alas if you merged the change locally and afterwards try to import the upstream version of the commit to the same branch with the change-id header intact Gerrit would refuse the push if it recognizes a commit as belonging to an already merged change on that branch.
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/089cc050-5b3a-423e-9391-57946ed01b52n%40googlegroups.com.
On Mon, Dec 15, 2025 at 12:39 AM Sven Selberg <sven.s...@axis.com> wrote:On Friday, December 12, 2025 at 6:34:20 PM UTC+1 Kaz Kylheku wrote:I've researched this topic a bit and found some past discussions, about it.The situation is: using Gerrit for producing local patches that are rebased against a moving upstream, on a daily bases.I read that common practice involves abandoning the local review once it has been upstreamed, scrubbed of its Change-Id and pulled down again.The problem is that the change has to be submitted locally; the local team needs the change to be merged so that everyone picks it up. It could be weeks or months before it is upstreamed, and in fact some changes aren never upstreamed.What happens to a Submitted Gerrit item when the submitted patchset's commit is reflected back from upstream without its Change-Id?In the process of removing the change-id you create a new commit and without the change-id Gerrit won't recognize that the new commit is a version of the existing change.
I don't think I understand the workflow you are describing as it doesn't make sense to me in git-context.I think this is describing something like a team that is maintaining branches in Gerrit based on an upstream not using Gerrit (for example, the Linux kernel) and both sending their patches to that upstream (in the kernel case, via the mailing list) and using Gerrit to review/submit their commits to a "downstream" branch. The upstream mailing list doesn't allow/accept Change-Id footers in commit messages, so there's no way to keep that association maintained between the downstream branch commits and the (hopefully) eventually merged upstream commits.
Since you are working with change-ids locally and without change-ids upstream they are two different git DAGs.
If you only care about the working tree in git you could keep a "local" branch were you create changes and merge them at your own pace while pulling upstream into "upstream" branch that you regularly merge into "local" (but that seems like a lot of work.
Don't know if the situation would be improved with the ideas from jujutsu about having the change-id as a commit-header instead of as a footer?If the upstream is using tools that would maintain the change-id commit header, yes, this would solve it with the addition of Gerrit support for reading that custom header. I do think this will be the eventual future solution, but... For now, there's not a lot of tooling that will maintain that extra commit headers (for example, 'git am' and 'git rebase' don't), so most upstreams will end up with commits without the custom change-id header. There was a big thread on the git mailing list and then a follow up discussion during Git Merge earlier this year discussing how to make git work better with Change-Ids. There's some openness to improvements within the git community, but also reluctance to do a lot in support of something not used by git itself. If there end up being some use cases in git that use a change-id, that would certainly help push the effort along.