Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,10 @@

app-k9mail/build.gradle.kts merge=merge_gradle
app-thunderbird/build.gradle.kts merge=merge_gradle
app-k9mail/src/main/res/raw/changelog_master.xml merge=ours

app-k9mail/src/main/res/raw/changelog_master.xml merge=merge_changelog
app-thunderbird/src/release/res/raw/changelog_master.xml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry, I missed something here and I think I sent you down the wrong path. For the following 3 files, we want to keep ours in all cases.

app-thunderbird/src/release/res/raw/changelog_master.xml merge=ours
app-thunderbird/src/beta/res/raw/changelog_master.xml merge=ours
app-k9mail/src/main/res/raw/changelog_master.xml merge=ours


app-metadata/com.fsck.k9/*/changelogs/** merge=merge_changelog
app-metadata/net.thunderbird.android.beta/*/changelogs/** merge=merge_changelog
app-metadata/net.thunderbird.android/*/changelogs/** merge=merge_changelog
Copy link
Collaborator

@coreycb coreycb Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, sorry I missed this. We don't want to merge anything in the above 3 changelogs directories. These directories contain release notes for releases from the current branch. (They are supposed to, at least, but that's probably not the case anymore due to previous merges.) The file names are based on the versionCode, and there's potential that the versionCode could overlap between beta and release.

So what we really want to do here is exclude any changes to these directories in the merge. Or at least use merge=ours.

3 changes: 2 additions & 1 deletion scripts/ci/merges/do_merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ git checkout ${into_branch}
git pull
git config merge.ours.driver true
git config merge.merge_gradle.driver "python3 scripts/ci/merges/merge_gradle.py %A %B"
git config merge.merge_changelog.driver "scripts/ci/merges/merge_changelog.sh %A %O %B"
set +e
git merge "origin/${from_branch}"
git merge -Xtheirs "origin/${from_branch}" 2>&1 | grep --color=always -E '\bCONFLICT\b|$'
ret=$?
set +x

Expand Down
10 changes: 10 additions & 0 deletions scripts/ci/merges/merge_changelog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

# This merge driver exists to override the -Xtheirs CLI option used when merging
# two trees together (e.g. main -> beta).

A="$1" # File A (ours)
O="$2" # Common ancestor
B="$3" # File B (theirs)

git merge-file -- "$A" "$O" "$B"
Loading