git-upstream finds extra commits when changing the upstream branch tracked
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
git-upstream |
Fix Released
|
High
|
Darragh Bailey |
Bug Description
git-upstream should be able to handle switching which upstream ref is being tracked and still be able to determine the correct set of local changes to be carried. At the very least it should provide the capability to be told what other references to search when looking for the previous point that imported from.
Simple use case would be switching from mainline to a stable branch, which diverges from master and then after a period of time to want to switch back to the latest master. Currently git-upstream will see the merge-base between master and the stable branch as the last import. Unfortunately this means any fixes to the stable branch will also be picked up and believed to also be local changes that should be replayed onto the new import.
The impact of this is lessened since the filters in git-upstream will spot any duplicate ChangeIds and discard as already being on master. So backports from master to stable branches are not an issue, however any unique release only changes will cause problems.
Changed in git-upstream: | |
assignee: | nobody → Darragh Bailey (dbailey-k) |
importance: | Undecided → High |
Changed in git-upstream: | |
status: | Fix Committed → Fix Released |
Example using ascii art:
------- ------- ------- ------- ----I -> local/master
/
F- --G---H -> previous import branch
/
D---E -> upstream/stable -C---J- --K---L -> upstream/master
/
A---B--
when running 'git upstream import --into local/master upstream/master' the previous import commit found will be 'C' when it should be 'E'.
It should be possible at least to tell git-upstream to scan both upstream/stable and upstream/master to find the most recent point from any upstream reference that is reachable and to use that as the previous import commit.