shallow-clone
history
shallow repo with only 3 of 10 commits reachable from HEAD
Description
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
Contracts
- 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)
Tags
Branches
main Use it
import { spinUpScenario } from '@gfargo/git-scenarios'
const repo = await spinUpScenario('shallow-clone') npx git-scenarios create shallow-clone import { describeWithScenario } from '@gfargo/git-scenarios/jest'
describeWithScenario('shallow-clone', (getRepo) => {
it('should have the expected state', async () => {
const repo = getRepo()
// your assertions here
})
}) Commit graph
* e5dcc92 (HEAD -> main) chore: release v1.0.0
* c6d192f docs: update readme
* 5059beb test: add test suite
* 8d9bff2 (grafted) feat: add auth