Skip to content

Instantly share code, notes, and snippets.

@aryairani
Created May 7, 2024 23:09
Show Gist options
  • Save aryairani/7d6ab9b6d35b8f9ce45a9540c73ac148 to your computer and use it in GitHub Desktop.
Save aryairani/7d6ab9b6d35b8f9ce45a9540c73ac148 to your computer and use it in GitHub Desktop.

Simple update propagation

Updates that occur in one branch are propagated to the other. In this example, Alice updates foo, while Bob adds a new dependent bar of the original foo. When Bob's branch is merged into Alice's, her update to foo is propagated to his bar.

.> project.create-empty project
project/main> builtins.mergeio

Original branch:

foo : Text
foo = "old foo"
project/main> add
project/main> branch alice

Alice's updates:

foo : Text
foo = "new foo"
project/alice> update
project/main> branch bob

Bob's adds:

bar : Text
bar = foo ++ " - " ++ foo
project/bob> display bar
project/bob> add

Merge result:

project/alice> merge /bob
project/alice> view foo bar
project/alice> display bar
.> project.delete project
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment