I’ve been working on Android source code for the past few weeks.
On the platform/build repository, I checked out the android-4.0.4_r2.1 tag. This became my ‘ics’ branch. Now, when either merging or rebasing against the android-4.1.1_r1 tag, I get a merge conflict in a file I’ve never edited.
These are the repos (and tags) in question:
https://android.googlesource.com/platform/build/+/android-4.0.4_r2.1
https://android.googlesource.com/platform/build/+/android-4.1.1_r1
This is the branch forked from the first tag, that I am trying to merge the latter tag into:
https://github.com/slimdroid/platform_build/commits/ics
I have absolutely no idea what could be causing this. I am not a total beginner with git, but I don’t see how I cannot merge without conflicts this tag when there should be a common base.
For information, my conflict is in core/build_id.mk on the line that specifics the BUILD_ID.
I’m not advanced in git, so I may be totally wrong here. But I understand your assumption is that the commit pointed by the first tag is an ancestor of the other tag. Only in such a case, you can guarantee that there will be no merge conflicts between them.
You can test this assumption by doing a
git merge-base first-tag second-tag.