Skip to main content

Scenario: pull-ahead

Only upstream changed since the clone.

Output​

setup.bash builds this state:

$ build_scenario scenario_pull_ahead

The monorepo commit a clones the upstream commit k, R; the upstream moved on to l, T

$ git splice status
On branch main

behind 1 vendor/a
$ git splice log
=== vendor/a (main)
> 6045a98 upstream change (Test <test@example.com>)

merge splices the change in as one ordinary commit, which also records the new synced commit in vendor/a/.splice:

$ git splice merge vendor/a
ok vendor/a: merged 6045a98

The monorepo's history stays linear, and upstream's commits never become part of it:

$ git log --format=%s
splice: merge vendor/a from main at 6045a98
add vendor/a
initial commit
$ git splice status
On branch main

up to date vendor/a