Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Loadouts] Support 'Rebase' Operation #63

Open
Sewer56 opened this issue Sep 13, 2024 · 0 comments
Open

[Loadouts] Support 'Rebase' Operation #63

Sewer56 opened this issue Sep 13, 2024 · 0 comments

Comments

@Sewer56
Copy link
Member

Sewer56 commented Sep 13, 2024

image

Image embedded from Atlassian's Git Rebase Guide.

Objective

Tip

This change is powered by an user-end use case.

A common operation is done by end users is to 'remix' a loadout.
Suppose the following:

  • A friend sends you their loadout
  • You make your adjustments to the loadout
  • Friend sends you an updated loadout

In this case, you may want to apply your friend's changes, while keeping yours.

Strategy

The general strategy is to start with your friend's updated loadout

  1. Iterate both loadouts as long as they match.

then once we find the point of divergence

  1. Apply remaining changes from your remixed 'Loadout B` until end.

i.e. in 'git' terminology, apply all commits past the point of branching.

Technical Problems

Merging 2 loadouts like this presents some problems with regards to mod load ordering;
there's no magically defined way in which 2 merged lists should be placed.

This is problematic, friend's loadout can add extra mods which we then won't have.

For the initial version, don't do any reordering; however do a validation pass.

At the end of the rebase, if the position of a mod changes relative to any other mod, log that;
so the user can fix up manually at the end.

e.g.

  • Mod A was before Mod C but is now after Mod C.

In a later implementation, we can show a mod list with just the mods whom changed positions relative to each other; the user can then rearrange them at the end of the rebase pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant