Scenario: cloned-by-hand
push of a splice that stores files in Git LFS works: Git LFS's own
pre-push hook runs on the git push that git splice push runs, and
uploads the content to the upstream's LFS server.
- Monorepo (
vendor/a/): cloned by hand from an upstream that storesmodel.binin Git LFS, and pushed to its own remote. - Upstream (
file://$UPSTREAM): as cloned.
Output
setup.bash builds this state:
$ build_scenario scenario_cloned_by_hand
A new .bin file in the splice is stored in Git LFS, as the upstream's
.gitattributes says. The commit has a pointer to its content:
$ echo "rules, version 1" >vendor/a/rules.bin && git add vendor/a/rules.bin && git commit -q -m "add the rules"
$ git show HEAD:vendor/a/rules.bin
version https://git-lfs.github.com/spec/v1
oid sha256:a3f7781bfe7ed96e5c83f8e43b302f7a1721dd5873ae08837248f16f34b7f463
size 17
push uploads the content along with the commit:
$ git splice push vendor/a
ok vendor/a: pushed 59a22e3 to main
and a clone of the upstream gets the file:
$ git clone -q "file://$UPSTREAM" ../upstream-clone && cat ../upstream-clone/rules.bin
rules, version 1