Repository navigation
Replies: 6 comments 5 replies
After looking into this more, I don't think this is actually an issue, because upstream is careful to use "dry merges" or whatever you call them, which mention the commit parents but don't actually include the commit itself. And so git will refuse to merge those commits again, even if via our branches. So as long as we don't make commits to the release branch we don't want on our master, I think we're fine. Open to dissenting opinions though ;). |
|
JD Smith ***@***.***> writes:
we may be accidentally merging things like merge commits or "back port" commits that are inappropriate (or worse) on
master.
I don't think this is actually an issue, because upstream is careful to use "dry merges" or whatever you call it, which mentioned
the commit parents but don't actually include the commit itself. And so git will refuse to merge those again, even if via our
branches. So as long as we don't have commits to release branch we don't want on master, I think we're fine.
Open to dissenting opinions though ;).
Don't know what the "dry" merges are called either. They are done using
strategy "ours", which means these commits are included in the merge
commit, but none of their changes are included. That's right, so far so
good.
I think a problem is when things happen in this sequence:
1. mac/30 gets merged with gnu/30 and the merge contains a backport
commit B.
2. mac/31 gets merged with mac/30 which means mac/31 now contains B
_including_ its changes.
3. gnu/31 get merged with gnu/30 using gitmerge.el. It now contains B
but none of its changes.
4. mac/31 gets merged with gnu/31. I think since mac/31 already contains
B, the changes of B which are contained in mac/31, will not be undone by
this.
|
|
Yeah that would be a problem. Perhaps a way to avoid it (@simmsb!) is to always first merge gnu/31→mac/31, then merge mac/30→mac/31. And we should probably sync up our merges to occur shortly after gnu/30 -> gnu/31 occurs (which seems to be every few days), to avoid a race condition in which some commit-to-be-dry-merged has not yet been. We could also target mac/31 for all mac-specific fixes, then back-port the ones we think are strictly necessary. This is probably a safer and more sensible plan overall, but I don't use mac/31, so less appealing for me. In this way, we'd never need to do mac/30→mac/31 merges. |
|
JD Smith ***@***.***> writes:
Take 53aac6a; that doc fix was committed by Eli 2 months ago to the
release branch (emacs-30). But then presumably was merged upstream to
be included in upstream master, which Eli does about once a week.
@simmsb just merged from upstream master, so this commit should have
already been included. But clearly it wasn't. It's now listed as a new
commit (b7c6c38) above.
`git branch --contains 53aac6a` says it's there, though?
I have:
[pull]
rebase = true
setup globally in my .gitconfig. Maybe I should disable rebase for emacs specifically?
Depends on how you use it, as usual. If you do `git pull emacs-30` to
update from GNU you'd rebase the mac changes every time, which is not
what I'm seeing I think. If you do `git merge emacs-30` instead, there
is no problem.
|
|
JD Smith ***@***.***> writes:
Yes, 53aac6a is in both my local branches emacs-mac-30_1_exp and
emacs-mac-gnu_master_exp, but when I merge the former into the latter,
the commit gets re-written as b7c6c38 every time. Not sure why it
should not be retained through a merge.
That's strange. When I do `git merge mac-30' into my local `mac-31`,
`53aac6a` is left as-is, as one would expect. I have basically nothing
in my .gitconfig.
|
|
Gerd Möllmann ***@***.***> writes:
JD Smith ***@***.***> writes:
> Yes, 53aac6a is in both my local branches emacs-mac-30_1_exp and
> emacs-mac-gnu_master_exp, but when I merge the former into the latter,
> the commit gets re-written as b7c6c38 every time. Not sure why it
> should not be retained through a merge.
That's strange. When I do `git merge mac-30' into my local `mac-31`,
`53aac6a` is left as-is, as one would expect. I have basically nothing
in my .gitconfig.
Maybe one can figure out what is happening by setting the env var
GIT_TRACE=true before running git commands.
|

Uh oh!
There was an error while loading. Please reload this page.
@gerd-moellmann mentions (#101):
Ohh boy, I had no idea about this. @simmsb, are you using this to merge from my branch to yours? If not, we may be accidentally merging things like merge commits or "back port" commits that are inappropriate (or worse) on master.
Maybe we'd better start following the suggestions in
git-workflow. So far most Mac-specific fixes/features have landed first on v30 then get merged to master.More "experimental"
macfeatures go to master first, never to appear in v30. I think that's a reasonable setup. But we certainly don't want to "cross the streams" between v30 and master in a way that our upstream tracking branches carefully avoid. Thoughts?All reactions