Skip to content

Cascading merges #1

@mwoods79

Description

@mwoods79

So the idea for me is that a lesson plan exists. Or a series of lectures.

Imagine you have a repo with the following branches.

1-lesson-one
2-lesson-two
3-lesson-three
...
10-lesson-ten

And each lesson builds on the source code of the previous.

Some times changes are needed in lesson plans. For instance, a function is mrege is implemented in lesson 3. This function is misspelled and should be corrected to merge in lessons 3 through 10. The function does not need to be merged into lesson 1 or 2 because the function (or concept) was not introduced there.

In order for this script to be useful it needs to parse the integer value from the beginning of each of the branches and then merge changes in a cascading fashion.

There needs to be a discussion about the interface.

I think the default should be something to the affect of:

$ script_name branch_name_or_starting_number [sha_to_merge]

In this example not giving the options sha_to_merge would automatically use the last commit on the specified branch_name_or_starting_number and cascade that commit to all later branches in the lesson plan.

If a sha_to_merge is given there are two options for implementation and they need to be explicitly documented.

  1. Only the diff of that sha is merged into the later branches
  2. All changes from that SHA forward are merged into the later lesson branches

If you want to get really fancy you could choose option 2 and give a range sha1..sha2 that would be merged into the later branches.

Can you think of any other scenarios of how we might need to use this script?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions