-
Notifications
You must be signed in to change notification settings - Fork 0
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
Branching #143
Comments
Sequences can be implemented in different ways opral/monorepo#3073 (comment). We need to check in UX testing how "branching" would be used to know what's the right way to implement sequence(s). |
Three requirements that come to my mind:
Branching Workflow Requirements Discussion @niklas.buchfink @nils.jacobsen (fink) @jan.johannes @jannes.blobel (csv protoype) @martin.lysk1 do you have more/different requirements? |
From the Fossil and Sqlite creator "not keeping the branch history is the main complaint"
|
I feel like copy changes from one to another branch is introduced too early. Let's build a simple change proposal with branches first. |
No commits used. |
Big insight after a call with @jan.johannes and @martin.lysk1:
The definition of a branch as a filter is a simple mental model, copying changes between branches is not needed (which should tremendously ease workflows), and makes the implementation in an initial version trivial. Proposed implementation Add a new table Branch
Automatically insert the first branch ("main" branch)
Add a pointer to the currently active branch Probably the ref table or a config somewhere else. @jan.johannes @martin.lysk1 are we aligned on the proposed implementation? PS the definition "A branch is a filter of currently applied changes" already hints optimization potential of only storing change ids in the branch that are applied, not every change id even if unapplied. |
Fine but please something fast to test out. I doesn't need to be optimized. |
I would go with the following table structure table
We will append changes during the lifetime of a branch - for main branch during the whole lifetime. I would add a separate table Also indexing which change belongs to wich branch will be - just adding a n index |
I think our proposals are identical. Follow up:
CREATE TABLE branch (
id TEXT PRIMARY KEY DEFAULT (uuid_v4()),
- branch_name TEXT
+ name TEXT -- name of the branch
) strict;
|
|
Aligned!
Agree? CREATE TABLE branch_change_map (
- id TEXT NOT NULL,
+ branch_id TEXT NOT NULL,
change_id TEXT NOT NULL,
+ FOREIGN KEY (branch_id) REFERENCES branch(id),
+ FOREIGN KEY (change_id) REFERENCES change(id),
+ PRIMARY KEY (branch_id, change_id)
) strict; |
We need branches to isolate work.
The text was updated successfully, but these errors were encountered: