Skip to content

shallow-clone

history

shallow repo with only 3 of 10 commits reachable from HEAD

A repository that appears to be a shallow clone (depth 3).
10 commits exist in the object store but only the last 3 are
reachable from HEAD. `.git/shallow` is set, so
`git rev-parse --is-shallow-repository` returns `true`.

Useful for testing:
  - tools that detect shallow repos and warn/error
  - log views that hit the shallow boundary
  - fetch/pull flows that offer --unshallow
  - blame views that stop at the graft point
  • main is checked out
  • repo is shallow (git rev-parse --is-shallow-repository = true)
  • main has 10 total commits in object store
  • only 4 commits are reachable from HEAD (depth boundary inclusive)
shallowhistory
main
import { spinUpScenario } from '@gfargo/git-scenarios'

const repo = await spinUpScenario('shallow-clone')
* e5dcc92 (HEAD -> main) chore: release v1.0.0
* c6d192f docs: update readme
* 5059beb test: add test suite
* 8d9bff2 (grafted) feat: add auth

Back to Scenario Browser