diff options
| author | 2026-03-06 11:54:21 +0800 | |
|---|---|---|
| committer | 2026-03-06 11:55:56 +0800 | |
| commit | c62c5544fa23378843a3383a9dcd4494e5ea33bc (patch) | |
| tree | 8b825a36767fe0ba3fb44f27cb634047c4c0318f | |
| parent | format/pack/ingest: Fix delta apply import (diff) | |
| signature | No signature | |
format/commitgraph: Split into ./read and ./ v0.1.60
| -rw-r--r-- | format/commitgraph/constants.go | 36 | ||||
| -rw-r--r-- | format/commitgraph/read/bloom.go (renamed from format/commitgraph/bloom.go) | 2 | ||||
| -rw-r--r-- | format/commitgraph/read/close.go (renamed from format/commitgraph/close.go) | 2 | ||||
| -rw-r--r-- | format/commitgraph/read/commitat.go (renamed from format/commitgraph/commitat.go) | 2 | ||||
| -rw-r--r-- | format/commitgraph/read/commits.go (renamed from format/commitgraph/commits.go) | 2 | ||||
| -rw-r--r-- | format/commitgraph/read/edges.go (renamed from format/commitgraph/edges.go) | 7 | ||||
| -rw-r--r-- | format/commitgraph/read/errors.go (renamed from format/commitgraph/errors.go) | 2 | ||||
| -rw-r--r-- | format/commitgraph/read/generation.go (renamed from format/commitgraph/generation.go) | 7 | ||||
| -rw-r--r-- | format/commitgraph/read/hash.go (renamed from format/commitgraph/hash.go) | 2 | ||||
| -rw-r--r-- | format/commitgraph/read/iterators.go (renamed from format/commitgraph/iterators.go) | 2 | ||||
| -rw-r--r-- | format/commitgraph/read/layer.go (renamed from format/commitgraph/layer.go) | 2 | ||||
| -rw-r--r-- | format/commitgraph/read/layer_close.go (renamed from format/commitgraph/layer_close.go) | 2 | ||||
| -rw-r--r-- | format/commitgraph/read/layer_lookup.go (renamed from format/commitgraph/layer_lookup.go) | 2 | ||||
| -rw-r--r-- | format/commitgraph/read/layer_open.go (renamed from format/commitgraph/layer_open.go) | 5 | ||||
| -rw-r--r-- | format/commitgraph/read/layer_parse.go (renamed from format/commitgraph/layer_parse.go) | 41 | ||||
| -rw-r--r-- | format/commitgraph/read/layer_pos.go (renamed from format/commitgraph/layer_pos.go) | 2 | ||||
| -rw-r--r-- | format/commitgraph/read/layerinfo.go (renamed from format/commitgraph/layerinfo.go) | 2 | ||||
| -rw-r--r-- | format/commitgraph/read/lookup.go (renamed from format/commitgraph/lookup.go) | 2 | ||||
| -rw-r--r-- | format/commitgraph/read/mode.go (renamed from format/commitgraph/mode.go) | 2 | ||||
| -rw-r--r-- | format/commitgraph/read/oidat.go (renamed from format/commitgraph/oidat.go) | 2 | ||||
| -rw-r--r-- | format/commitgraph/read/open.go (renamed from format/commitgraph/open.go) | 2 | ||||
| -rw-r--r-- | format/commitgraph/read/open_chain.go (renamed from format/commitgraph/open_chain.go) | 2 | ||||
| -rw-r--r-- | format/commitgraph/read/open_single.go (renamed from format/commitgraph/open_single.go) | 2 | ||||
| -rw-r--r-- | format/commitgraph/read/parents.go (renamed from format/commitgraph/parents.go) | 14 | ||||
| -rw-r--r-- | format/commitgraph/read/position.go (renamed from format/commitgraph/position.go) | 2 | ||||
| -rw-r--r-- | format/commitgraph/read/read_test.go (renamed from format/commitgraph/read_test.go) | 22 | ||||
| -rw-r--r-- | format/commitgraph/read/reader.go (renamed from format/commitgraph/reader.go) | 2 | ||||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/HEAD (renamed from format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/HEAD) | 0 | ||||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/config (renamed from format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/config) | 0 | ||||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/objects/info/commit-graphs/commit-graph-chain (renamed from format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/objects/info/commit-graphs/commit-graph-chain) | 0 | ||||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/objects/info/commit-graphs/graph-bf985c21612a52070d8b008e6ef51edf8b609401.graph (renamed from format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/objects/info/commit-graphs/graph-bf985c21612a52070d8b008e6ef51edf8b609401.graph) | bin | 4810 -> 4810 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/objects/info/commit-graphs/graph-dd7578d5216ca76c25b19631ba90f7498aeabbe7.graph (renamed from format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/objects/info/commit-graphs/graph-dd7578d5216ca76c25b19631ba90f7498aeabbe7.graph) | bin | 7088 -> 7088 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/objects/info/packs (renamed from format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/objects/info/packs) | 0 | ||||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/objects/pack/pack-15b064d6a8ef8cff520565f6db8c006b2e6f7f2f.bitmap (renamed from format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/objects/pack/pack-15b064d6a8ef8cff520565f6db8c006b2e6f7f2f.bitmap) | bin | 8234 -> 8234 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/objects/pack/pack-15b064d6a8ef8cff520565f6db8c006b2e6f7f2f.idx (renamed from format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/objects/pack/pack-15b064d6a8ef8cff520565f6db8c006b2e6f7f2f.idx) | bin | 13252 -> 13252 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/objects/pack/pack-15b064d6a8ef8cff520565f6db8c006b2e6f7f2f.pack (renamed from format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/objects/pack/pack-15b064d6a8ef8cff520565f6db8c006b2e6f7f2f.pack) | bin | 34730 -> 34730 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/objects/pack/pack-15b064d6a8ef8cff520565f6db8c006b2e6f7f2f.rev (renamed from format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/objects/pack/pack-15b064d6a8ef8cff520565f6db8c006b2e6f7f2f.rev) | bin | 1792 -> 1792 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/refs/heads/master (renamed from format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/refs/heads/master) | 0 | ||||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha1/single_changed/repo.git/HEAD (renamed from format/commitgraph/testdata/fixtures/sha1/single_changed/repo.git/HEAD) | 0 | ||||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha1/single_changed/repo.git/config (renamed from format/commitgraph/testdata/fixtures/sha1/single_changed/repo.git/config) | 0 | ||||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha1/single_changed/repo.git/objects/info/commit-graph (renamed from format/commitgraph/testdata/fixtures/sha1/single_changed/repo.git/objects/info/commit-graph) | bin | 9068 -> 9068 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha1/single_changed/repo.git/objects/info/packs (renamed from format/commitgraph/testdata/fixtures/sha1/single_changed/repo.git/objects/info/packs) | 0 | ||||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha1/single_changed/repo.git/objects/pack/pack-34e9e132566989e2abfe8821731236c77f9bcbe9.bitmap (renamed from format/commitgraph/testdata/fixtures/sha1/single_changed/repo.git/objects/pack/pack-34e9e132566989e2abfe8821731236c77f9bcbe9.bitmap) | bin | 7780 -> 7780 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha1/single_changed/repo.git/objects/pack/pack-34e9e132566989e2abfe8821731236c77f9bcbe9.idx (renamed from format/commitgraph/testdata/fixtures/sha1/single_changed/repo.git/objects/pack/pack-34e9e132566989e2abfe8821731236c77f9bcbe9.idx) | bin | 11152 -> 11152 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha1/single_changed/repo.git/objects/pack/pack-34e9e132566989e2abfe8821731236c77f9bcbe9.pack (renamed from format/commitgraph/testdata/fixtures/sha1/single_changed/repo.git/objects/pack/pack-34e9e132566989e2abfe8821731236c77f9bcbe9.pack) | bin | 28664 -> 28664 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha1/single_changed/repo.git/objects/pack/pack-34e9e132566989e2abfe8821731236c77f9bcbe9.rev (renamed from format/commitgraph/testdata/fixtures/sha1/single_changed/repo.git/objects/pack/pack-34e9e132566989e2abfe8821731236c77f9bcbe9.rev) | bin | 1492 -> 1492 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha1/single_changed/repo.git/refs/heads/main (renamed from format/commitgraph/testdata/fixtures/sha1/single_changed/repo.git/refs/heads/main) | 0 | ||||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha1/single_nochanged/repo.git/HEAD (renamed from format/commitgraph/testdata/fixtures/sha1/single_nochanged/repo.git/HEAD) | 0 | ||||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha1/single_nochanged/repo.git/config (renamed from format/commitgraph/testdata/fixtures/sha1/single_nochanged/repo.git/config) | 0 | ||||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha1/single_nochanged/repo.git/objects/info/commit-graph (renamed from format/commitgraph/testdata/fixtures/sha1/single_nochanged/repo.git/objects/info/commit-graph) | bin | 5912 -> 5912 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha1/single_nochanged/repo.git/objects/info/packs (renamed from format/commitgraph/testdata/fixtures/sha1/single_nochanged/repo.git/objects/info/packs) | 0 | ||||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha1/single_nochanged/repo.git/objects/pack/pack-a3da595034c94bb16b6829d757a66b7d259b9ffc.bitmap (renamed from format/commitgraph/testdata/fixtures/sha1/single_nochanged/repo.git/objects/pack/pack-a3da595034c94bb16b6829d757a66b7d259b9ffc.bitmap) | bin | 5452 -> 5452 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha1/single_nochanged/repo.git/objects/pack/pack-a3da595034c94bb16b6829d757a66b7d259b9ffc.idx (renamed from format/commitgraph/testdata/fixtures/sha1/single_nochanged/repo.git/objects/pack/pack-a3da595034c94bb16b6829d757a66b7d259b9ffc.idx) | bin | 7792 -> 7792 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha1/single_nochanged/repo.git/objects/pack/pack-a3da595034c94bb16b6829d757a66b7d259b9ffc.pack (renamed from format/commitgraph/testdata/fixtures/sha1/single_nochanged/repo.git/objects/pack/pack-a3da595034c94bb16b6829d757a66b7d259b9ffc.pack) | bin | 18969 -> 18969 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha1/single_nochanged/repo.git/objects/pack/pack-a3da595034c94bb16b6829d757a66b7d259b9ffc.rev (renamed from format/commitgraph/testdata/fixtures/sha1/single_nochanged/repo.git/objects/pack/pack-a3da595034c94bb16b6829d757a66b7d259b9ffc.rev) | bin | 1012 -> 1012 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha1/single_nochanged/repo.git/refs/heads/master (renamed from format/commitgraph/testdata/fixtures/sha1/single_nochanged/repo.git/refs/heads/master) | 0 | ||||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/HEAD (renamed from format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/HEAD) | 0 | ||||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/config (renamed from format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/config) | 0 | ||||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/objects/info/commit-graphs/commit-graph-chain (renamed from format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/objects/info/commit-graphs/commit-graph-chain) | 0 | ||||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/objects/info/commit-graphs/graph-505cab61f8ddfa614301e8f97943112739236c6bcd19ed4d1f7c6b830cab4f62.graph (renamed from format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/objects/info/commit-graphs/graph-505cab61f8ddfa614301e8f97943112739236c6bcd19ed4d1f7c6b830cab4f62.graph) | bin | 9260 -> 9260 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/objects/info/commit-graphs/graph-77c47bd6ca2ce17208c9361717a5823c0cb4b5ee336a14959678e060d674ffb6.graph (renamed from format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/objects/info/commit-graphs/graph-77c47bd6ca2ce17208c9361717a5823c0cb4b5ee336a14959678e060d674ffb6.graph) | bin | 6154 -> 6154 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/objects/info/packs (renamed from format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/objects/info/packs) | 0 | ||||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/objects/pack/pack-04168d0884c910f505cb9fbcf045957e44ccee06d812b5e531ae666014a26ed1.bitmap (renamed from format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/objects/pack/pack-04168d0884c910f505cb9fbcf045957e44ccee06d812b5e531ae666014a26ed1.bitmap) | bin | 8234 -> 8234 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/objects/pack/pack-04168d0884c910f505cb9fbcf045957e44ccee06d812b5e531ae666014a26ed1.idx (renamed from format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/objects/pack/pack-04168d0884c910f505cb9fbcf045957e44ccee06d812b5e531ae666014a26ed1.idx) | bin | 18496 -> 18496 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/objects/pack/pack-04168d0884c910f505cb9fbcf045957e44ccee06d812b5e531ae666014a26ed1.pack (renamed from format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/objects/pack/pack-04168d0884c910f505cb9fbcf045957e44ccee06d812b5e531ae666014a26ed1.pack) | bin | 41482 -> 41482 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/objects/pack/pack-04168d0884c910f505cb9fbcf045957e44ccee06d812b5e531ae666014a26ed1.rev (renamed from format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/objects/pack/pack-04168d0884c910f505cb9fbcf045957e44ccee06d812b5e531ae666014a26ed1.rev) | bin | 1816 -> 1816 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/refs/heads/master (renamed from format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/refs/heads/master) | 0 | ||||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha256/single_changed/repo.git/HEAD (renamed from format/commitgraph/testdata/fixtures/sha256/single_changed/repo.git/HEAD) | 0 | ||||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha256/single_changed/repo.git/config (renamed from format/commitgraph/testdata/fixtures/sha256/single_changed/repo.git/config) | 0 | ||||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha256/single_changed/repo.git/objects/info/commit-graph (renamed from format/commitgraph/testdata/fixtures/sha256/single_changed/repo.git/objects/info/commit-graph) | bin | 11960 -> 11960 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha256/single_changed/repo.git/objects/info/packs (renamed from format/commitgraph/testdata/fixtures/sha256/single_changed/repo.git/objects/info/packs) | 0 | ||||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha256/single_changed/repo.git/objects/pack/pack-316dbc67dac12d131591640da0c55b76387cbf1fd2a117ab3d7ca0d854a031c9.bitmap (renamed from format/commitgraph/testdata/fixtures/sha256/single_changed/repo.git/objects/pack/pack-316dbc67dac12d131591640da0c55b76387cbf1fd2a117ab3d7ca0d854a031c9.bitmap) | bin | 7804 -> 7804 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha256/single_changed/repo.git/objects/pack/pack-316dbc67dac12d131591640da0c55b76387cbf1fd2a117ab3d7ca0d854a031c9.idx (renamed from format/commitgraph/testdata/fixtures/sha256/single_changed/repo.git/objects/pack/pack-316dbc67dac12d131591640da0c55b76387cbf1fd2a117ab3d7ca0d854a031c9.idx) | bin | 15496 -> 15496 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha256/single_changed/repo.git/objects/pack/pack-316dbc67dac12d131591640da0c55b76387cbf1fd2a117ab3d7ca0d854a031c9.pack (renamed from format/commitgraph/testdata/fixtures/sha256/single_changed/repo.git/objects/pack/pack-316dbc67dac12d131591640da0c55b76387cbf1fd2a117ab3d7ca0d854a031c9.pack) | bin | 34252 -> 34252 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha256/single_changed/repo.git/objects/pack/pack-316dbc67dac12d131591640da0c55b76387cbf1fd2a117ab3d7ca0d854a031c9.rev (renamed from format/commitgraph/testdata/fixtures/sha256/single_changed/repo.git/objects/pack/pack-316dbc67dac12d131591640da0c55b76387cbf1fd2a117ab3d7ca0d854a031c9.rev) | bin | 1516 -> 1516 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha256/single_changed/repo.git/refs/heads/main (renamed from format/commitgraph/testdata/fixtures/sha256/single_changed/repo.git/refs/heads/main) | 0 | ||||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha256/single_nochanged/repo.git/HEAD (renamed from format/commitgraph/testdata/fixtures/sha256/single_nochanged/repo.git/HEAD) | 0 | ||||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha256/single_nochanged/repo.git/config (renamed from format/commitgraph/testdata/fixtures/sha256/single_nochanged/repo.git/config) | 0 | ||||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha256/single_nochanged/repo.git/objects/info/commit-graph (renamed from format/commitgraph/testdata/fixtures/sha256/single_nochanged/repo.git/objects/info/commit-graph) | bin | 7844 -> 7844 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha256/single_nochanged/repo.git/objects/info/packs (renamed from format/commitgraph/testdata/fixtures/sha256/single_nochanged/repo.git/objects/info/packs) | 0 | ||||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha256/single_nochanged/repo.git/objects/pack/pack-d335453f760b064e36459d780ec9bf0e5dd596c0ee1ac6310136067c4f13438b.bitmap (renamed from format/commitgraph/testdata/fixtures/sha256/single_nochanged/repo.git/objects/pack/pack-d335453f760b064e36459d780ec9bf0e5dd596c0ee1ac6310136067c4f13438b.bitmap) | bin | 5476 -> 5476 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha256/single_nochanged/repo.git/objects/pack/pack-d335453f760b064e36459d780ec9bf0e5dd596c0ee1ac6310136067c4f13438b.idx (renamed from format/commitgraph/testdata/fixtures/sha256/single_nochanged/repo.git/objects/pack/pack-d335453f760b064e36459d780ec9bf0e5dd596c0ee1ac6310136067c4f13438b.idx) | bin | 10696 -> 10696 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha256/single_nochanged/repo.git/objects/pack/pack-d335453f760b064e36459d780ec9bf0e5dd596c0ee1ac6310136067c4f13438b.pack (renamed from format/commitgraph/testdata/fixtures/sha256/single_nochanged/repo.git/objects/pack/pack-d335453f760b064e36459d780ec9bf0e5dd596c0ee1ac6310136067c4f13438b.pack) | bin | 22569 -> 22569 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha256/single_nochanged/repo.git/objects/pack/pack-d335453f760b064e36459d780ec9bf0e5dd596c0ee1ac6310136067c4f13438b.rev (renamed from format/commitgraph/testdata/fixtures/sha256/single_nochanged/repo.git/objects/pack/pack-d335453f760b064e36459d780ec9bf0e5dd596c0ee1ac6310136067c4f13438b.rev) | bin | 1036 -> 1036 bytes | |||
| -rw-r--r-- | format/commitgraph/read/testdata/fixtures/sha256/single_nochanged/repo.git/refs/heads/master (renamed from format/commitgraph/testdata/fixtures/sha256/single_nochanged/repo.git/refs/heads/master) | 0 | ||||
| -rw-r--r-- | reachability/ancestor.go | 10 | ||||
| -rw-r--r-- | reachability/reachability.go | 6 | ||||
| -rw-r--r-- | reachability/walk_expand_commits_graph.go | 4 |
88 files changed, 99 insertions, 93 deletions
diff --git a/format/commitgraph/constants.go b/format/commitgraph/constants.go index 96648fae..3a06a290 100644 --- a/format/commitgraph/constants.go +++ b/format/commitgraph/constants.go @@ -1,32 +1,32 @@ package commitgraph const ( - fileSignature = 0x43475048 // "CGPH" - fileVersion = 1 + FileSignature = 0x43475048 // "CGPH" + FileVersion = 1 ) const ( - chunkOIDF = 0x4f494446 // "OIDF" - chunkOIDL = 0x4f49444c // "OIDL" - chunkCDAT = 0x43444154 // "CDAT" - chunkGDA2 = 0x47444132 // "GDA2" - chunkGDO2 = 0x47444f32 // "GDO2" - chunkEDGE = 0x45444745 // "EDGE" - chunkBIDX = 0x42494458 // "BIDX" - chunkBDAT = 0x42444154 // "BDAT" - chunkBASE = 0x42415345 // "BASE" + ChunkOIDF = 0x4f494446 // "OIDF" + ChunkOIDL = 0x4f49444c // "OIDL" + ChunkCDAT = 0x43444154 // "CDAT" + ChunkGDA2 = 0x47444132 // "GDA2" + ChunkGDO2 = 0x47444f32 // "GDO2" + ChunkEDGE = 0x45444745 // "EDGE" + ChunkBIDX = 0x42494458 // "BIDX" + ChunkBDAT = 0x42444154 // "BDAT" + ChunkBASE = 0x42415345 // "BASE" ) const ( - headerSize = 8 - chunkEntrySize = 12 - fanoutSize = 256 * 4 + HeaderSize = 8 + ChunkEntrySize = 12 + FanoutSize = 256 * 4 ) const ( - parentNone = 0x70000000 - parentExtraMask = 0x80000000 - parentLastMask = 0x7fffffff + ParentNone = 0x70000000 + ParentExtraMask = 0x80000000 + ParentLastMask = 0x7fffffff - generationOverflow = 0x80000000 + GenerationOverflow = 0x80000000 ) diff --git a/format/commitgraph/bloom.go b/format/commitgraph/read/bloom.go index 660dc1db..9b66f458 100644 --- a/format/commitgraph/bloom.go +++ b/format/commitgraph/read/bloom.go @@ -1,4 +1,4 @@ -package commitgraph +package read import ( "encoding/binary" diff --git a/format/commitgraph/close.go b/format/commitgraph/read/close.go index 8b9e2e9f..d91c7762 100644 --- a/format/commitgraph/close.go +++ b/format/commitgraph/read/close.go @@ -1,4 +1,4 @@ -package commitgraph +package read // Close releases all mapped commit-graph files. func (reader *Reader) Close() error { diff --git a/format/commitgraph/commitat.go b/format/commitgraph/read/commitat.go index 4d5853b1..bcd115f8 100644 --- a/format/commitgraph/commitat.go +++ b/format/commitgraph/read/commitat.go @@ -1,4 +1,4 @@ -package commitgraph +package read import ( "encoding/binary" diff --git a/format/commitgraph/commits.go b/format/commitgraph/read/commits.go index 0f5313e9..38dffe7b 100644 --- a/format/commitgraph/commits.go +++ b/format/commitgraph/read/commits.go @@ -1,4 +1,4 @@ -package commitgraph +package read import "codeberg.org/lindenii/furgit/objectid" diff --git a/format/commitgraph/edges.go b/format/commitgraph/read/edges.go index 277735d0..de8bab60 100644 --- a/format/commitgraph/edges.go +++ b/format/commitgraph/read/edges.go @@ -1,8 +1,9 @@ -package commitgraph +package read import ( "encoding/binary" + "codeberg.org/lindenii/furgit/format/commitgraph" "codeberg.org/lindenii/furgit/internal/intconv" ) @@ -27,7 +28,7 @@ func (reader *Reader) decodeExtraEdgeList(layer *layer, edgeStart uint32) ([]Pos } word := binary.BigEndian.Uint32(layer.chunkExtraEdges[off : off+4]) - parentGlobal := word & parentLastMask + parentGlobal := word & commitgraph.ParentLastMask parentPos, err := reader.globalToPosition(parentGlobal) if err != nil { @@ -36,7 +37,7 @@ func (reader *Reader) decodeExtraEdgeList(layer *layer, edgeStart uint32) ([]Pos out = append(out, parentPos) - if word&parentExtraMask != 0 { + if word&commitgraph.ParentExtraMask != 0 { break } diff --git a/format/commitgraph/errors.go b/format/commitgraph/read/errors.go index 0b7b7b6f..9d0eca04 100644 --- a/format/commitgraph/errors.go +++ b/format/commitgraph/read/errors.go @@ -1,4 +1,4 @@ -package commitgraph +package read import ( "fmt" diff --git a/format/commitgraph/generation.go b/format/commitgraph/read/generation.go index 41c743ab..d1f0ebe7 100644 --- a/format/commitgraph/generation.go +++ b/format/commitgraph/read/generation.go @@ -1,8 +1,9 @@ -package commitgraph +package read import ( "encoding/binary" + "codeberg.org/lindenii/furgit/format/commitgraph" "codeberg.org/lindenii/furgit/internal/intconv" ) @@ -20,11 +21,11 @@ func (reader *Reader) readGenerationV2(layer *layer, index uint32, commitTime ui value := binary.BigEndian.Uint32(layer.chunkGeneration[off : off+4]) - if value&generationOverflow == 0 { + if value&commitgraph.GenerationOverflow == 0 { return commitTime + uint64(value), nil } - gdo2Index := value ^ generationOverflow + gdo2Index := value ^ commitgraph.GenerationOverflow gdo2Off64 := uint64(gdo2Index) * 8 gdo2Off, err := intconv.Uint64ToInt(gdo2Off64) diff --git a/format/commitgraph/hash.go b/format/commitgraph/read/hash.go index 55bc0195..3f30df91 100644 --- a/format/commitgraph/hash.go +++ b/format/commitgraph/read/hash.go @@ -1,4 +1,4 @@ -package commitgraph +package read import ( "bytes" diff --git a/format/commitgraph/iterators.go b/format/commitgraph/read/iterators.go index 27385709..d4ad9105 100644 --- a/format/commitgraph/iterators.go +++ b/format/commitgraph/read/iterators.go @@ -1,4 +1,4 @@ -package commitgraph +package read import ( "iter" diff --git a/format/commitgraph/layer.go b/format/commitgraph/read/layer.go index 3f6011cc..53ab1663 100644 --- a/format/commitgraph/layer.go +++ b/format/commitgraph/read/layer.go @@ -1,4 +1,4 @@ -package commitgraph +package read import ( "os" diff --git a/format/commitgraph/layer_close.go b/format/commitgraph/read/layer_close.go index 9b7dfbb0..03dc91d5 100644 --- a/format/commitgraph/layer_close.go +++ b/format/commitgraph/read/layer_close.go @@ -1,4 +1,4 @@ -package commitgraph +package read import "syscall" diff --git a/format/commitgraph/layer_lookup.go b/format/commitgraph/read/layer_lookup.go index 3ae4ff53..9a03505a 100644 --- a/format/commitgraph/layer_lookup.go +++ b/format/commitgraph/read/layer_lookup.go @@ -1,4 +1,4 @@ -package commitgraph +package read import ( "bytes" diff --git a/format/commitgraph/layer_open.go b/format/commitgraph/read/layer_open.go index 857b3022..bf126960 100644 --- a/format/commitgraph/layer_open.go +++ b/format/commitgraph/read/layer_open.go @@ -1,9 +1,10 @@ -package commitgraph +package read import ( "os" "syscall" + "codeberg.org/lindenii/furgit/format/commitgraph" "codeberg.org/lindenii/furgit/internal/intconv" "codeberg.org/lindenii/furgit/objectid" ) @@ -22,7 +23,7 @@ func openLayer(root *os.Root, relPath string, algo objectid.Algorithm) (*layer, } size := info.Size() - if size < int64(headerSize+fanoutSize+algo.Size()) { + if size < int64(commitgraph.HeaderSize+commitgraph.FanoutSize+algo.Size()) { _ = file.Close() return nil, &ErrMalformed{Path: relPath, Reason: "file too short"} diff --git a/format/commitgraph/layer_parse.go b/format/commitgraph/read/layer_parse.go index d6d77b9e..dca9f416 100644 --- a/format/commitgraph/layer_parse.go +++ b/format/commitgraph/read/layer_parse.go @@ -1,27 +1,28 @@ -package commitgraph +package read import ( "encoding/binary" + "codeberg.org/lindenii/furgit/format/commitgraph" "codeberg.org/lindenii/furgit/format/commitgraph/bloom" "codeberg.org/lindenii/furgit/internal/intconv" "codeberg.org/lindenii/furgit/objectid" ) func parseLayer(layer *layer, algo objectid.Algorithm) error { //nolint:maintidx - if len(layer.data) < headerSize { + if len(layer.data) < commitgraph.HeaderSize { return &ErrMalformed{Path: layer.path, Reason: "file too short"} } - header := layer.data[:headerSize] + header := layer.data[:commitgraph.HeaderSize] signature := binary.BigEndian.Uint32(header[:4]) - if signature != fileSignature { + if signature != commitgraph.FileSignature { return &ErrMalformed{Path: layer.path, Reason: "invalid signature"} } version := header[4] - if version != fileVersion { + if version != commitgraph.FileVersion { return &ErrUnsupportedVersion{Version: version} } @@ -38,8 +39,8 @@ func parseLayer(layer *layer, algo objectid.Algorithm) error { //nolint:maintidx numChunks := int(header[6]) baseCount := uint32(header[7]) - tocLen := (numChunks + 1) * chunkEntrySize - tocStart := headerSize + tocLen := (numChunks + 1) * commitgraph.ChunkEntrySize + tocStart := commitgraph.HeaderSize tocEnd := tocStart + tocLen if tocEnd > len(layer.data) { @@ -53,8 +54,8 @@ func parseLayer(layer *layer, algo objectid.Algorithm) error { //nolint:maintidx entries := make([]tocEntry, 0, numChunks+1) for i := range numChunks + 1 { - entryOff := tocStart + i*chunkEntrySize - entryData := layer.data[entryOff : entryOff+chunkEntrySize] + entryOff := tocStart + i*commitgraph.ChunkEntrySize + entryData := layer.data[entryOff : entryOff+commitgraph.ChunkEntrySize] entry := tocEntry{ id: binary.BigEndian.Uint32(entryData[:4]), @@ -99,13 +100,13 @@ func parseLayer(layer *layer, algo objectid.Algorithm) error { //nolint:maintidx chunks[entry.id] = layer.data[start:end] } - oidf := chunks[chunkOIDF] - if len(oidf) != fanoutSize { + oidf := chunks[commitgraph.ChunkOIDF] + if len(oidf) != commitgraph.FanoutSize { return &ErrMalformed{Path: layer.path, Reason: "invalid OIDF length"} } layer.chunkOIDFanout = oidf - layer.numCommits = binary.BigEndian.Uint32(oidf[fanoutSize-4:]) + layer.numCommits = binary.BigEndian.Uint32(oidf[commitgraph.FanoutSize-4:]) for i := range 255 { cur := binary.BigEndian.Uint32(oidf[i*4 : (i+1)*4]) @@ -123,7 +124,7 @@ func parseLayer(layer *layer, algo objectid.Algorithm) error { //nolint:maintidx return err } - oidl := chunks[chunkOIDL] + oidl := chunks[commitgraph.ChunkOIDL] oidlWantLen64 := uint64(layer.numCommits) * hashSizeU64 oidlWantLen, err := intconv.Uint64ToInt(oidlWantLen64) @@ -144,7 +145,7 @@ func parseLayer(layer *layer, algo objectid.Algorithm) error { //nolint:maintidx return err } - cdat := chunks[chunkCDAT] + cdat := chunks[commitgraph.ChunkCDAT] cdatWantLen64 := uint64(layer.numCommits) * strideU64 cdatWantLen, err := intconv.Uint64ToInt(cdatWantLen64) @@ -158,7 +159,7 @@ func parseLayer(layer *layer, algo objectid.Algorithm) error { //nolint:maintidx layer.chunkCommit = cdat - gda2 := chunks[chunkGDA2] + gda2 := chunks[commitgraph.ChunkGDA2] if len(gda2) != 0 { wantLen64 := uint64(layer.numCommits) * 4 @@ -174,7 +175,7 @@ func parseLayer(layer *layer, algo objectid.Algorithm) error { //nolint:maintidx layer.chunkGeneration = gda2 } - gdo2 := chunks[chunkGDO2] + gdo2 := chunks[commitgraph.ChunkGDO2] if len(gdo2) != 0 { if len(gdo2)%8 != 0 { return &ErrMalformed{Path: layer.path, Reason: "invalid GDO2 length"} @@ -183,7 +184,7 @@ func parseLayer(layer *layer, algo objectid.Algorithm) error { //nolint:maintidx layer.chunkGenerationOv = gdo2 } - edge := chunks[chunkEDGE] + edge := chunks[commitgraph.ChunkEDGE] if len(edge) != 0 { if len(edge)%4 != 0 { return &ErrMalformed{Path: layer.path, Reason: "invalid EDGE length"} @@ -192,7 +193,7 @@ func parseLayer(layer *layer, algo objectid.Algorithm) error { //nolint:maintidx layer.chunkExtraEdges = edge } - base := chunks[chunkBASE] + base := chunks[commitgraph.ChunkBASE] if baseCount == 0 { if len(base) != 0 { return &ErrMalformed{Path: layer.path, Reason: "unexpected BASE chunk"} @@ -214,9 +215,9 @@ func parseLayer(layer *layer, algo objectid.Algorithm) error { //nolint:maintidx layer.baseCount = baseCount - bidx := chunks[chunkBIDX] + bidx := chunks[commitgraph.ChunkBIDX] - bdat := chunks[chunkBDAT] + bdat := chunks[commitgraph.ChunkBDAT] if len(bidx) != 0 || len(bdat) != 0 { //nolint:nestif if len(bidx) == 0 || len(bdat) == 0 { return &ErrMalformed{Path: layer.path, Reason: "BIDX/BDAT must both be present"} diff --git a/format/commitgraph/layer_pos.go b/format/commitgraph/read/layer_pos.go index 3b82c433..b93a842e 100644 --- a/format/commitgraph/layer_pos.go +++ b/format/commitgraph/read/layer_pos.go @@ -1,4 +1,4 @@ -package commitgraph +package read import "codeberg.org/lindenii/furgit/internal/intconv" diff --git a/format/commitgraph/layerinfo.go b/format/commitgraph/read/layerinfo.go index f5750368..83c4407d 100644 --- a/format/commitgraph/layerinfo.go +++ b/format/commitgraph/read/layerinfo.go @@ -1,4 +1,4 @@ -package commitgraph +package read // LayerInfo describes one loaded commit-graph layer. type LayerInfo struct { diff --git a/format/commitgraph/lookup.go b/format/commitgraph/read/lookup.go index 2cd8bf75..cfd3b8cc 100644 --- a/format/commitgraph/lookup.go +++ b/format/commitgraph/read/lookup.go @@ -1,4 +1,4 @@ -package commitgraph +package read import ( "codeberg.org/lindenii/furgit/internal/intconv" diff --git a/format/commitgraph/mode.go b/format/commitgraph/read/mode.go index 71b55412..76afa21f 100644 --- a/format/commitgraph/mode.go +++ b/format/commitgraph/read/mode.go @@ -1,4 +1,4 @@ -package commitgraph +package read // OpenMode controls which commit-graph layout Open loads. type OpenMode uint8 diff --git a/format/commitgraph/oidat.go b/format/commitgraph/read/oidat.go index e277125b..af3f31f0 100644 --- a/format/commitgraph/oidat.go +++ b/format/commitgraph/read/oidat.go @@ -1,4 +1,4 @@ -package commitgraph +package read import ( "codeberg.org/lindenii/furgit/internal/intconv" diff --git a/format/commitgraph/open.go b/format/commitgraph/read/open.go index 5eff8934..2efb4b46 100644 --- a/format/commitgraph/open.go +++ b/format/commitgraph/read/open.go @@ -1,4 +1,4 @@ -package commitgraph +package read import ( "fmt" diff --git a/format/commitgraph/open_chain.go b/format/commitgraph/read/open_chain.go index 212a4049..f64040bc 100644 --- a/format/commitgraph/open_chain.go +++ b/format/commitgraph/read/open_chain.go @@ -1,4 +1,4 @@ -package commitgraph +package read import ( "bufio" diff --git a/format/commitgraph/open_single.go b/format/commitgraph/read/open_single.go index 255abf39..f20cd166 100644 --- a/format/commitgraph/open_single.go +++ b/format/commitgraph/read/open_single.go @@ -1,4 +1,4 @@ -package commitgraph +package read import ( "os" diff --git a/format/commitgraph/parents.go b/format/commitgraph/read/parents.go index df6d33ff..0f8024ab 100644 --- a/format/commitgraph/parents.go +++ b/format/commitgraph/read/parents.go @@ -1,4 +1,6 @@ -package commitgraph +package read + +import "codeberg.org/lindenii/furgit/format/commitgraph" // ParentRef references one parent position. type ParentRef struct { @@ -12,11 +14,11 @@ func (reader *Reader) decodeParents(layer *layer, p1, p2 uint32) (ParentRef, Par return ParentRef{}, ParentRef{}, nil, err } - if p2 == parentNone { + if p2 == commitgraph.ParentNone { return parent1, ParentRef{}, nil, nil } - if p2&parentExtraMask == 0 { + if p2&commitgraph.ParentExtraMask == 0 { parent2, err := reader.decodeSingleParent(p2) if err != nil { return ParentRef{}, ParentRef{}, nil, err @@ -25,7 +27,7 @@ func (reader *Reader) decodeParents(layer *layer, p1, p2 uint32) (ParentRef, Par return parent1, parent2, nil, nil } - edgeStart := p2 & parentLastMask + edgeStart := p2 & commitgraph.ParentLastMask parents, err := reader.decodeExtraEdgeList(layer, edgeStart) if err != nil { @@ -45,11 +47,11 @@ func (reader *Reader) decodeParents(layer *layer, p1, p2 uint32) (ParentRef, Par } func (reader *Reader) decodeSingleParent(raw uint32) (ParentRef, error) { - if raw == parentNone { + if raw == commitgraph.ParentNone { return ParentRef{}, nil } - if raw&parentExtraMask != 0 { + if raw&commitgraph.ParentExtraMask != 0 { return ParentRef{}, &ErrMalformed{ Path: "commit-graph", Reason: "unexpected EDGE marker in single-parent slot", diff --git a/format/commitgraph/position.go b/format/commitgraph/read/position.go index 5e8bd486..f92f5b3a 100644 --- a/format/commitgraph/position.go +++ b/format/commitgraph/read/position.go @@ -1,4 +1,4 @@ -package commitgraph +package read import ( "fmt" diff --git a/format/commitgraph/read_test.go b/format/commitgraph/read/read_test.go index 0771514a..0efd67ca 100644 --- a/format/commitgraph/read_test.go +++ b/format/commitgraph/read/read_test.go @@ -1,4 +1,4 @@ -package commitgraph_test +package read_test import ( "errors" @@ -8,8 +8,8 @@ import ( "strings" "testing" - "codeberg.org/lindenii/furgit/format/commitgraph" "codeberg.org/lindenii/furgit/format/commitgraph/bloom" + "codeberg.org/lindenii/furgit/format/commitgraph/read" "codeberg.org/lindenii/furgit/internal/intconv" "codeberg.org/lindenii/furgit/internal/testgit" "codeberg.org/lindenii/furgit/objectid" @@ -33,7 +33,7 @@ func TestReadSingleMatchesGit(t *testing.T) { testgit.ForEachAlgorithm(t, func(t *testing.T, algo objectid.Algorithm) { //nolint:thelper testRepo := fixtureRepo(t, algo, "single_changed") - reader := openReader(t, testRepo, commitgraph.OpenSingle) + reader := openReader(t, testRepo, read.OpenSingle) defer func() { _ = reader.Close() }() @@ -97,7 +97,7 @@ func TestReadChainMatchesGit(t *testing.T) { testgit.ForEachAlgorithm(t, func(t *testing.T, algo objectid.Algorithm) { //nolint:thelper testRepo := fixtureRepo(t, algo, "chain_changed") - reader := openReader(t, testRepo, commitgraph.OpenChain) + reader := openReader(t, testRepo, read.OpenChain) defer func() { _ = reader.Close() }() @@ -150,7 +150,7 @@ func TestBloomUnavailableWithoutChangedPaths(t *testing.T) { testgit.ForEachAlgorithm(t, func(t *testing.T, algo objectid.Algorithm) { //nolint:thelper testRepo := fixtureRepo(t, algo, "single_nochanged") - reader := openReader(t, testRepo, commitgraph.OpenSingle) + reader := openReader(t, testRepo, read.OpenSingle) defer func() { _ = reader.Close() }() @@ -166,7 +166,7 @@ func TestBloomUnavailableWithoutChangedPaths(t *testing.T) { t.Fatal("BloomFilterAt() error = nil, want ErrBloomUnavailable") } - var unavailable *commitgraph.ErrBloomUnavailable + var unavailable *read.ErrBloomUnavailable if !errors.As(err, &unavailable) { t.Fatalf("BloomFilterAt() error type = %T, want *ErrBloomUnavailable", err) } @@ -177,7 +177,7 @@ func TestBloomUnavailableWithoutChangedPaths(t *testing.T) { }) } -func openReader(tb testing.TB, testRepo *testgit.TestRepo, mode commitgraph.OpenMode) *commitgraph.Reader { +func openReader(tb testing.TB, testRepo *testgit.TestRepo, mode read.OpenMode) *read.Reader { tb.Helper() objectsPath := filepath.Join(testRepo.Dir(), "objects") @@ -187,7 +187,7 @@ func openReader(tb testing.TB, testRepo *testgit.TestRepo, mode commitgraph.Open tb.Fatalf("os.OpenRoot(%q): %v", objectsPath, err) } - reader, err := commitgraph.Open(root, testRepo.Algorithm(), mode) + reader, err := read.Open(root, testRepo.Algorithm(), mode) closeErr := root.Close() if closeErr != nil { @@ -195,13 +195,13 @@ func openReader(tb testing.TB, testRepo *testgit.TestRepo, mode commitgraph.Open } if err != nil { - tb.Fatalf("commitgraph.Open(%q): %v", objectsPath, err) + tb.Fatalf("read.Open(%q): %v", objectsPath, err) } return reader } -func verifyCommitAgainstGit(tb testing.TB, testRepo *testgit.TestRepo, reader *commitgraph.Reader, id objectid.ObjectID) { +func verifyCommitAgainstGit(tb testing.TB, testRepo *testgit.TestRepo, reader *read.Reader, id objectid.ObjectID) { tb.Helper() pos, err := reader.Lookup(id) @@ -265,7 +265,7 @@ func verifyCommitAgainstGit(tb testing.TB, testRepo *testgit.TestRepo, reader *c assertChangedPathsBloomPositive(tb, testRepo, filter, id) } -func commitParents(tb testing.TB, reader *commitgraph.Reader, commit commitgraph.Commit) []objectid.ObjectID { +func commitParents(tb testing.TB, reader *read.Reader, commit read.Commit) []objectid.ObjectID { tb.Helper() out := make([]objectid.ObjectID, 0, 2+len(commit.ExtraParents)) diff --git a/format/commitgraph/reader.go b/format/commitgraph/read/reader.go index b7af3282..922d459b 100644 --- a/format/commitgraph/reader.go +++ b/format/commitgraph/read/reader.go @@ -1,4 +1,4 @@ -package commitgraph +package read import "codeberg.org/lindenii/furgit/objectid" diff --git a/format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/HEAD b/format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/HEAD index cb089cd8..cb089cd8 100644 --- a/format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/HEAD +++ b/format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/HEAD diff --git a/format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/config b/format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/config index 07d359d0..07d359d0 100644 --- a/format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/config +++ b/format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/config diff --git a/format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/objects/info/commit-graphs/commit-graph-chain b/format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/objects/info/commit-graphs/commit-graph-chain index 74c46b64..74c46b64 100644 --- a/format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/objects/info/commit-graphs/commit-graph-chain +++ b/format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/objects/info/commit-graphs/commit-graph-chain diff --git a/format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/objects/info/commit-graphs/graph-bf985c21612a52070d8b008e6ef51edf8b609401.graph b/format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/objects/info/commit-graphs/graph-bf985c21612a52070d8b008e6ef51edf8b609401.graph Binary files differindex c31869c1..c31869c1 100644 --- a/format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/objects/info/commit-graphs/graph-bf985c21612a52070d8b008e6ef51edf8b609401.graph +++ b/format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/objects/info/commit-graphs/graph-bf985c21612a52070d8b008e6ef51edf8b609401.graph diff --git a/format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/objects/info/commit-graphs/graph-dd7578d5216ca76c25b19631ba90f7498aeabbe7.graph b/format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/objects/info/commit-graphs/graph-dd7578d5216ca76c25b19631ba90f7498aeabbe7.graph Binary files differindex 241eb3cc..241eb3cc 100644 --- a/format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/objects/info/commit-graphs/graph-dd7578d5216ca76c25b19631ba90f7498aeabbe7.graph +++ b/format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/objects/info/commit-graphs/graph-dd7578d5216ca76c25b19631ba90f7498aeabbe7.graph diff --git a/format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/objects/info/packs b/format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/objects/info/packs index 61decf9b..61decf9b 100644 --- a/format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/objects/info/packs +++ b/format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/objects/info/packs diff --git a/format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/objects/pack/pack-15b064d6a8ef8cff520565f6db8c006b2e6f7f2f.bitmap b/format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/objects/pack/pack-15b064d6a8ef8cff520565f6db8c006b2e6f7f2f.bitmap Binary files differindex 1508cf18..1508cf18 100644 --- a/format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/objects/pack/pack-15b064d6a8ef8cff520565f6db8c006b2e6f7f2f.bitmap +++ b/format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/objects/pack/pack-15b064d6a8ef8cff520565f6db8c006b2e6f7f2f.bitmap diff --git a/format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/objects/pack/pack-15b064d6a8ef8cff520565f6db8c006b2e6f7f2f.idx b/format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/objects/pack/pack-15b064d6a8ef8cff520565f6db8c006b2e6f7f2f.idx Binary files differindex 00ee2646..00ee2646 100644 --- a/format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/objects/pack/pack-15b064d6a8ef8cff520565f6db8c006b2e6f7f2f.idx +++ b/format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/objects/pack/pack-15b064d6a8ef8cff520565f6db8c006b2e6f7f2f.idx diff --git a/format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/objects/pack/pack-15b064d6a8ef8cff520565f6db8c006b2e6f7f2f.pack b/format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/objects/pack/pack-15b064d6a8ef8cff520565f6db8c006b2e6f7f2f.pack Binary files differindex c65ae27f..c65ae27f 100644 --- a/format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/objects/pack/pack-15b064d6a8ef8cff520565f6db8c006b2e6f7f2f.pack +++ b/format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/objects/pack/pack-15b064d6a8ef8cff520565f6db8c006b2e6f7f2f.pack diff --git a/format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/objects/pack/pack-15b064d6a8ef8cff520565f6db8c006b2e6f7f2f.rev b/format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/objects/pack/pack-15b064d6a8ef8cff520565f6db8c006b2e6f7f2f.rev Binary files differindex d0689f72..d0689f72 100644 --- a/format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/objects/pack/pack-15b064d6a8ef8cff520565f6db8c006b2e6f7f2f.rev +++ b/format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/objects/pack/pack-15b064d6a8ef8cff520565f6db8c006b2e6f7f2f.rev diff --git a/format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/refs/heads/master b/format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/refs/heads/master index 8942d437..8942d437 100644 --- a/format/commitgraph/testdata/fixtures/sha1/chain_changed/repo.git/refs/heads/master +++ b/format/commitgraph/read/testdata/fixtures/sha1/chain_changed/repo.git/refs/heads/master diff --git a/format/commitgraph/testdata/fixtures/sha1/single_changed/repo.git/HEAD b/format/commitgraph/read/testdata/fixtures/sha1/single_changed/repo.git/HEAD index b870d826..b870d826 100644 --- a/format/commitgraph/testdata/fixtures/sha1/single_changed/repo.git/HEAD +++ b/format/commitgraph/read/testdata/fixtures/sha1/single_changed/repo.git/HEAD diff --git a/format/commitgraph/testdata/fixtures/sha1/single_changed/repo.git/config b/format/commitgraph/read/testdata/fixtures/sha1/single_changed/repo.git/config index 07d359d0..07d359d0 100644 --- a/format/commitgraph/testdata/fixtures/sha1/single_changed/repo.git/config +++ b/format/commitgraph/read/testdata/fixtures/sha1/single_changed/repo.git/config diff --git a/format/commitgraph/testdata/fixtures/sha1/single_changed/repo.git/objects/info/commit-graph b/format/commitgraph/read/testdata/fixtures/sha1/single_changed/repo.git/objects/info/commit-graph Binary files differindex 56b59a54..56b59a54 100644 --- a/format/commitgraph/testdata/fixtures/sha1/single_changed/repo.git/objects/info/commit-graph +++ b/format/commitgraph/read/testdata/fixtures/sha1/single_changed/repo.git/objects/info/commit-graph diff --git a/format/commitgraph/testdata/fixtures/sha1/single_changed/repo.git/objects/info/packs b/format/commitgraph/read/testdata/fixtures/sha1/single_changed/repo.git/objects/info/packs index ecf5d272..ecf5d272 100644 --- a/format/commitgraph/testdata/fixtures/sha1/single_changed/repo.git/objects/info/packs +++ b/format/commitgraph/read/testdata/fixtures/sha1/single_changed/repo.git/objects/info/packs diff --git a/format/commitgraph/testdata/fixtures/sha1/single_changed/repo.git/objects/pack/pack-34e9e132566989e2abfe8821731236c77f9bcbe9.bitmap b/format/commitgraph/read/testdata/fixtures/sha1/single_changed/repo.git/objects/pack/pack-34e9e132566989e2abfe8821731236c77f9bcbe9.bitmap Binary files differindex 9fec7b16..9fec7b16 100644 --- a/format/commitgraph/testdata/fixtures/sha1/single_changed/repo.git/objects/pack/pack-34e9e132566989e2abfe8821731236c77f9bcbe9.bitmap +++ b/format/commitgraph/read/testdata/fixtures/sha1/single_changed/repo.git/objects/pack/pack-34e9e132566989e2abfe8821731236c77f9bcbe9.bitmap diff --git a/format/commitgraph/testdata/fixtures/sha1/single_changed/repo.git/objects/pack/pack-34e9e132566989e2abfe8821731236c77f9bcbe9.idx b/format/commitgraph/read/testdata/fixtures/sha1/single_changed/repo.git/objects/pack/pack-34e9e132566989e2abfe8821731236c77f9bcbe9.idx Binary files differindex e30cbb5a..e30cbb5a 100644 --- a/format/commitgraph/testdata/fixtures/sha1/single_changed/repo.git/objects/pack/pack-34e9e132566989e2abfe8821731236c77f9bcbe9.idx +++ b/format/commitgraph/read/testdata/fixtures/sha1/single_changed/repo.git/objects/pack/pack-34e9e132566989e2abfe8821731236c77f9bcbe9.idx diff --git a/format/commitgraph/testdata/fixtures/sha1/single_changed/repo.git/objects/pack/pack-34e9e132566989e2abfe8821731236c77f9bcbe9.pack b/format/commitgraph/read/testdata/fixtures/sha1/single_changed/repo.git/objects/pack/pack-34e9e132566989e2abfe8821731236c77f9bcbe9.pack Binary files differindex 8da45eab..8da45eab 100644 --- a/format/commitgraph/testdata/fixtures/sha1/single_changed/repo.git/objects/pack/pack-34e9e132566989e2abfe8821731236c77f9bcbe9.pack +++ b/format/commitgraph/read/testdata/fixtures/sha1/single_changed/repo.git/objects/pack/pack-34e9e132566989e2abfe8821731236c77f9bcbe9.pack diff --git a/format/commitgraph/testdata/fixtures/sha1/single_changed/repo.git/objects/pack/pack-34e9e132566989e2abfe8821731236c77f9bcbe9.rev b/format/commitgraph/read/testdata/fixtures/sha1/single_changed/repo.git/objects/pack/pack-34e9e132566989e2abfe8821731236c77f9bcbe9.rev Binary files differindex 3bcd2e2c..3bcd2e2c 100644 --- a/format/commitgraph/testdata/fixtures/sha1/single_changed/repo.git/objects/pack/pack-34e9e132566989e2abfe8821731236c77f9bcbe9.rev +++ b/format/commitgraph/read/testdata/fixtures/sha1/single_changed/repo.git/objects/pack/pack-34e9e132566989e2abfe8821731236c77f9bcbe9.rev diff --git a/format/commitgraph/testdata/fixtures/sha1/single_changed/repo.git/refs/heads/main b/format/commitgraph/read/testdata/fixtures/sha1/single_changed/repo.git/refs/heads/main index 090ca933..090ca933 100644 --- a/format/commitgraph/testdata/fixtures/sha1/single_changed/repo.git/refs/heads/main +++ b/format/commitgraph/read/testdata/fixtures/sha1/single_changed/repo.git/refs/heads/main diff --git a/format/commitgraph/testdata/fixtures/sha1/single_nochanged/repo.git/HEAD b/format/commitgraph/read/testdata/fixtures/sha1/single_nochanged/repo.git/HEAD index cb089cd8..cb089cd8 100644 --- a/format/commitgraph/testdata/fixtures/sha1/single_nochanged/repo.git/HEAD +++ b/format/commitgraph/read/testdata/fixtures/sha1/single_nochanged/repo.git/HEAD diff --git a/format/commitgraph/testdata/fixtures/sha1/single_nochanged/repo.git/config b/format/commitgraph/read/testdata/fixtures/sha1/single_nochanged/repo.git/config index 07d359d0..07d359d0 100644 --- a/format/commitgraph/testdata/fixtures/sha1/single_nochanged/repo.git/config +++ b/format/commitgraph/read/testdata/fixtures/sha1/single_nochanged/repo.git/config diff --git a/format/commitgraph/testdata/fixtures/sha1/single_nochanged/repo.git/objects/info/commit-graph b/format/commitgraph/read/testdata/fixtures/sha1/single_nochanged/repo.git/objects/info/commit-graph Binary files differindex 28f7d06a..28f7d06a 100644 --- a/format/commitgraph/testdata/fixtures/sha1/single_nochanged/repo.git/objects/info/commit-graph +++ b/format/commitgraph/read/testdata/fixtures/sha1/single_nochanged/repo.git/objects/info/commit-graph diff --git a/format/commitgraph/testdata/fixtures/sha1/single_nochanged/repo.git/objects/info/packs b/format/commitgraph/read/testdata/fixtures/sha1/single_nochanged/repo.git/objects/info/packs index 8434a002..8434a002 100644 --- a/format/commitgraph/testdata/fixtures/sha1/single_nochanged/repo.git/objects/info/packs +++ b/format/commitgraph/read/testdata/fixtures/sha1/single_nochanged/repo.git/objects/info/packs diff --git a/format/commitgraph/testdata/fixtures/sha1/single_nochanged/repo.git/objects/pack/pack-a3da595034c94bb16b6829d757a66b7d259b9ffc.bitmap b/format/commitgraph/read/testdata/fixtures/sha1/single_nochanged/repo.git/objects/pack/pack-a3da595034c94bb16b6829d757a66b7d259b9ffc.bitmap Binary files differindex 64a36c71..64a36c71 100644 --- a/format/commitgraph/testdata/fixtures/sha1/single_nochanged/repo.git/objects/pack/pack-a3da595034c94bb16b6829d757a66b7d259b9ffc.bitmap +++ b/format/commitgraph/read/testdata/fixtures/sha1/single_nochanged/repo.git/objects/pack/pack-a3da595034c94bb16b6829d757a66b7d259b9ffc.bitmap diff --git a/format/commitgraph/testdata/fixtures/sha1/single_nochanged/repo.git/objects/pack/pack-a3da595034c94bb16b6829d757a66b7d259b9ffc.idx b/format/commitgraph/read/testdata/fixtures/sha1/single_nochanged/repo.git/objects/pack/pack-a3da595034c94bb16b6829d757a66b7d259b9ffc.idx Binary files differindex f5e16674..f5e16674 100644 --- a/format/commitgraph/testdata/fixtures/sha1/single_nochanged/repo.git/objects/pack/pack-a3da595034c94bb16b6829d757a66b7d259b9ffc.idx +++ b/format/commitgraph/read/testdata/fixtures/sha1/single_nochanged/repo.git/objects/pack/pack-a3da595034c94bb16b6829d757a66b7d259b9ffc.idx diff --git a/format/commitgraph/testdata/fixtures/sha1/single_nochanged/repo.git/objects/pack/pack-a3da595034c94bb16b6829d757a66b7d259b9ffc.pack b/format/commitgraph/read/testdata/fixtures/sha1/single_nochanged/repo.git/objects/pack/pack-a3da595034c94bb16b6829d757a66b7d259b9ffc.pack Binary files differindex 8f82b451..8f82b451 100644 --- a/format/commitgraph/testdata/fixtures/sha1/single_nochanged/repo.git/objects/pack/pack-a3da595034c94bb16b6829d757a66b7d259b9ffc.pack +++ b/format/commitgraph/read/testdata/fixtures/sha1/single_nochanged/repo.git/objects/pack/pack-a3da595034c94bb16b6829d757a66b7d259b9ffc.pack diff --git a/format/commitgraph/testdata/fixtures/sha1/single_nochanged/repo.git/objects/pack/pack-a3da595034c94bb16b6829d757a66b7d259b9ffc.rev b/format/commitgraph/read/testdata/fixtures/sha1/single_nochanged/repo.git/objects/pack/pack-a3da595034c94bb16b6829d757a66b7d259b9ffc.rev Binary files differindex 64771f70..64771f70 100644 --- a/format/commitgraph/testdata/fixtures/sha1/single_nochanged/repo.git/objects/pack/pack-a3da595034c94bb16b6829d757a66b7d259b9ffc.rev +++ b/format/commitgraph/read/testdata/fixtures/sha1/single_nochanged/repo.git/objects/pack/pack-a3da595034c94bb16b6829d757a66b7d259b9ffc.rev diff --git a/format/commitgraph/testdata/fixtures/sha1/single_nochanged/repo.git/refs/heads/master b/format/commitgraph/read/testdata/fixtures/sha1/single_nochanged/repo.git/refs/heads/master index 475cb2c1..475cb2c1 100644 --- a/format/commitgraph/testdata/fixtures/sha1/single_nochanged/repo.git/refs/heads/master +++ b/format/commitgraph/read/testdata/fixtures/sha1/single_nochanged/repo.git/refs/heads/master diff --git a/format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/HEAD b/format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/HEAD index cb089cd8..cb089cd8 100644 --- a/format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/HEAD +++ b/format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/HEAD diff --git a/format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/config b/format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/config index 7d1c0006..7d1c0006 100644 --- a/format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/config +++ b/format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/config diff --git a/format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/objects/info/commit-graphs/commit-graph-chain b/format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/objects/info/commit-graphs/commit-graph-chain index 4e7d76fe..4e7d76fe 100644 --- a/format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/objects/info/commit-graphs/commit-graph-chain +++ b/format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/objects/info/commit-graphs/commit-graph-chain diff --git a/format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/objects/info/commit-graphs/graph-505cab61f8ddfa614301e8f97943112739236c6bcd19ed4d1f7c6b830cab4f62.graph b/format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/objects/info/commit-graphs/graph-505cab61f8ddfa614301e8f97943112739236c6bcd19ed4d1f7c6b830cab4f62.graph Binary files differindex 4a93de94..4a93de94 100644 --- a/format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/objects/info/commit-graphs/graph-505cab61f8ddfa614301e8f97943112739236c6bcd19ed4d1f7c6b830cab4f62.graph +++ b/format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/objects/info/commit-graphs/graph-505cab61f8ddfa614301e8f97943112739236c6bcd19ed4d1f7c6b830cab4f62.graph diff --git a/format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/objects/info/commit-graphs/graph-77c47bd6ca2ce17208c9361717a5823c0cb4b5ee336a14959678e060d674ffb6.graph b/format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/objects/info/commit-graphs/graph-77c47bd6ca2ce17208c9361717a5823c0cb4b5ee336a14959678e060d674ffb6.graph Binary files differindex 7807351d..7807351d 100644 --- a/format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/objects/info/commit-graphs/graph-77c47bd6ca2ce17208c9361717a5823c0cb4b5ee336a14959678e060d674ffb6.graph +++ b/format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/objects/info/commit-graphs/graph-77c47bd6ca2ce17208c9361717a5823c0cb4b5ee336a14959678e060d674ffb6.graph diff --git a/format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/objects/info/packs b/format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/objects/info/packs index 3b1241c4..3b1241c4 100644 --- a/format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/objects/info/packs +++ b/format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/objects/info/packs diff --git a/format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/objects/pack/pack-04168d0884c910f505cb9fbcf045957e44ccee06d812b5e531ae666014a26ed1.bitmap b/format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/objects/pack/pack-04168d0884c910f505cb9fbcf045957e44ccee06d812b5e531ae666014a26ed1.bitmap Binary files differindex 007fcd0e..007fcd0e 100644 --- a/format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/objects/pack/pack-04168d0884c910f505cb9fbcf045957e44ccee06d812b5e531ae666014a26ed1.bitmap +++ b/format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/objects/pack/pack-04168d0884c910f505cb9fbcf045957e44ccee06d812b5e531ae666014a26ed1.bitmap diff --git a/format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/objects/pack/pack-04168d0884c910f505cb9fbcf045957e44ccee06d812b5e531ae666014a26ed1.idx b/format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/objects/pack/pack-04168d0884c910f505cb9fbcf045957e44ccee06d812b5e531ae666014a26ed1.idx Binary files differindex 248cf8fc..248cf8fc 100644 --- a/format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/objects/pack/pack-04168d0884c910f505cb9fbcf045957e44ccee06d812b5e531ae666014a26ed1.idx +++ b/format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/objects/pack/pack-04168d0884c910f505cb9fbcf045957e44ccee06d812b5e531ae666014a26ed1.idx diff --git a/format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/objects/pack/pack-04168d0884c910f505cb9fbcf045957e44ccee06d812b5e531ae666014a26ed1.pack b/format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/objects/pack/pack-04168d0884c910f505cb9fbcf045957e44ccee06d812b5e531ae666014a26ed1.pack Binary files differindex 92cea7fb..92cea7fb 100644 --- a/format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/objects/pack/pack-04168d0884c910f505cb9fbcf045957e44ccee06d812b5e531ae666014a26ed1.pack +++ b/format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/objects/pack/pack-04168d0884c910f505cb9fbcf045957e44ccee06d812b5e531ae666014a26ed1.pack diff --git a/format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/objects/pack/pack-04168d0884c910f505cb9fbcf045957e44ccee06d812b5e531ae666014a26ed1.rev b/format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/objects/pack/pack-04168d0884c910f505cb9fbcf045957e44ccee06d812b5e531ae666014a26ed1.rev Binary files differindex 569862ce..569862ce 100644 --- a/format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/objects/pack/pack-04168d0884c910f505cb9fbcf045957e44ccee06d812b5e531ae666014a26ed1.rev +++ b/format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/objects/pack/pack-04168d0884c910f505cb9fbcf045957e44ccee06d812b5e531ae666014a26ed1.rev diff --git a/format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/refs/heads/master b/format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/refs/heads/master index 29d83be8..29d83be8 100644 --- a/format/commitgraph/testdata/fixtures/sha256/chain_changed/repo.git/refs/heads/master +++ b/format/commitgraph/read/testdata/fixtures/sha256/chain_changed/repo.git/refs/heads/master diff --git a/format/commitgraph/testdata/fixtures/sha256/single_changed/repo.git/HEAD b/format/commitgraph/read/testdata/fixtures/sha256/single_changed/repo.git/HEAD index b870d826..b870d826 100644 --- a/format/commitgraph/testdata/fixtures/sha256/single_changed/repo.git/HEAD +++ b/format/commitgraph/read/testdata/fixtures/sha256/single_changed/repo.git/HEAD diff --git a/format/commitgraph/testdata/fixtures/sha256/single_changed/repo.git/config b/format/commitgraph/read/testdata/fixtures/sha256/single_changed/repo.git/config index 7d1c0006..7d1c0006 100644 --- a/format/commitgraph/testdata/fixtures/sha256/single_changed/repo.git/config +++ b/format/commitgraph/read/testdata/fixtures/sha256/single_changed/repo.git/config diff --git a/format/commitgraph/testdata/fixtures/sha256/single_changed/repo.git/objects/info/commit-graph b/format/commitgraph/read/testdata/fixtures/sha256/single_changed/repo.git/objects/info/commit-graph Binary files differindex f4dd0e0c..f4dd0e0c 100644 --- a/format/commitgraph/testdata/fixtures/sha256/single_changed/repo.git/objects/info/commit-graph +++ b/format/commitgraph/read/testdata/fixtures/sha256/single_changed/repo.git/objects/info/commit-graph diff --git a/format/commitgraph/testdata/fixtures/sha256/single_changed/repo.git/objects/info/packs b/format/commitgraph/read/testdata/fixtures/sha256/single_changed/repo.git/objects/info/packs index 0f39ed89..0f39ed89 100644 --- a/format/commitgraph/testdata/fixtures/sha256/single_changed/repo.git/objects/info/packs +++ b/format/commitgraph/read/testdata/fixtures/sha256/single_changed/repo.git/objects/info/packs diff --git a/format/commitgraph/testdata/fixtures/sha256/single_changed/repo.git/objects/pack/pack-316dbc67dac12d131591640da0c55b76387cbf1fd2a117ab3d7ca0d854a031c9.bitmap b/format/commitgraph/read/testdata/fixtures/sha256/single_changed/repo.git/objects/pack/pack-316dbc67dac12d131591640da0c55b76387cbf1fd2a117ab3d7ca0d854a031c9.bitmap Binary files differindex b5c5055c..b5c5055c 100644 --- a/format/commitgraph/testdata/fixtures/sha256/single_changed/repo.git/objects/pack/pack-316dbc67dac12d131591640da0c55b76387cbf1fd2a117ab3d7ca0d854a031c9.bitmap +++ b/format/commitgraph/read/testdata/fixtures/sha256/single_changed/repo.git/objects/pack/pack-316dbc67dac12d131591640da0c55b76387cbf1fd2a117ab3d7ca0d854a031c9.bitmap diff --git a/format/commitgraph/testdata/fixtures/sha256/single_changed/repo.git/objects/pack/pack-316dbc67dac12d131591640da0c55b76387cbf1fd2a117ab3d7ca0d854a031c9.idx b/format/commitgraph/read/testdata/fixtures/sha256/single_changed/repo.git/objects/pack/pack-316dbc67dac12d131591640da0c55b76387cbf1fd2a117ab3d7ca0d854a031c9.idx Binary files differindex 144778cd..144778cd 100644 --- a/format/commitgraph/testdata/fixtures/sha256/single_changed/repo.git/objects/pack/pack-316dbc67dac12d131591640da0c55b76387cbf1fd2a117ab3d7ca0d854a031c9.idx +++ b/format/commitgraph/read/testdata/fixtures/sha256/single_changed/repo.git/objects/pack/pack-316dbc67dac12d131591640da0c55b76387cbf1fd2a117ab3d7ca0d854a031c9.idx diff --git a/format/commitgraph/testdata/fixtures/sha256/single_changed/repo.git/objects/pack/pack-316dbc67dac12d131591640da0c55b76387cbf1fd2a117ab3d7ca0d854a031c9.pack b/format/commitgraph/read/testdata/fixtures/sha256/single_changed/repo.git/objects/pack/pack-316dbc67dac12d131591640da0c55b76387cbf1fd2a117ab3d7ca0d854a031c9.pack Binary files differindex 599ccae0..599ccae0 100644 --- a/format/commitgraph/testdata/fixtures/sha256/single_changed/repo.git/objects/pack/pack-316dbc67dac12d131591640da0c55b76387cbf1fd2a117ab3d7ca0d854a031c9.pack +++ b/format/commitgraph/read/testdata/fixtures/sha256/single_changed/repo.git/objects/pack/pack-316dbc67dac12d131591640da0c55b76387cbf1fd2a117ab3d7ca0d854a031c9.pack diff --git a/format/commitgraph/testdata/fixtures/sha256/single_changed/repo.git/objects/pack/pack-316dbc67dac12d131591640da0c55b76387cbf1fd2a117ab3d7ca0d854a031c9.rev b/format/commitgraph/read/testdata/fixtures/sha256/single_changed/repo.git/objects/pack/pack-316dbc67dac12d131591640da0c55b76387cbf1fd2a117ab3d7ca0d854a031c9.rev Binary files differindex 3c093f31..3c093f31 100644 --- a/format/commitgraph/testdata/fixtures/sha256/single_changed/repo.git/objects/pack/pack-316dbc67dac12d131591640da0c55b76387cbf1fd2a117ab3d7ca0d854a031c9.rev +++ b/format/commitgraph/read/testdata/fixtures/sha256/single_changed/repo.git/objects/pack/pack-316dbc67dac12d131591640da0c55b76387cbf1fd2a117ab3d7ca0d854a031c9.rev diff --git a/format/commitgraph/testdata/fixtures/sha256/single_changed/repo.git/refs/heads/main b/format/commitgraph/read/testdata/fixtures/sha256/single_changed/repo.git/refs/heads/main index 4ba32358..4ba32358 100644 --- a/format/commitgraph/testdata/fixtures/sha256/single_changed/repo.git/refs/heads/main +++ b/format/commitgraph/read/testdata/fixtures/sha256/single_changed/repo.git/refs/heads/main diff --git a/format/commitgraph/testdata/fixtures/sha256/single_nochanged/repo.git/HEAD b/format/commitgraph/read/testdata/fixtures/sha256/single_nochanged/repo.git/HEAD index cb089cd8..cb089cd8 100644 --- a/format/commitgraph/testdata/fixtures/sha256/single_nochanged/repo.git/HEAD +++ b/format/commitgraph/read/testdata/fixtures/sha256/single_nochanged/repo.git/HEAD diff --git a/format/commitgraph/testdata/fixtures/sha256/single_nochanged/repo.git/config b/format/commitgraph/read/testdata/fixtures/sha256/single_nochanged/repo.git/config index 7d1c0006..7d1c0006 100644 --- a/format/commitgraph/testdata/fixtures/sha256/single_nochanged/repo.git/config +++ b/format/commitgraph/read/testdata/fixtures/sha256/single_nochanged/repo.git/config diff --git a/format/commitgraph/testdata/fixtures/sha256/single_nochanged/repo.git/objects/info/commit-graph b/format/commitgraph/read/testdata/fixtures/sha256/single_nochanged/repo.git/objects/info/commit-graph Binary files differindex f98ca4a1..f98ca4a1 100644 --- a/format/commitgraph/testdata/fixtures/sha256/single_nochanged/repo.git/objects/info/commit-graph +++ b/format/commitgraph/read/testdata/fixtures/sha256/single_nochanged/repo.git/objects/info/commit-graph diff --git a/format/commitgraph/testdata/fixtures/sha256/single_nochanged/repo.git/objects/info/packs b/format/commitgraph/read/testdata/fixtures/sha256/single_nochanged/repo.git/objects/info/packs index 65184c9a..65184c9a 100644 --- a/format/commitgraph/testdata/fixtures/sha256/single_nochanged/repo.git/objects/info/packs +++ b/format/commitgraph/read/testdata/fixtures/sha256/single_nochanged/repo.git/objects/info/packs diff --git a/format/commitgraph/testdata/fixtures/sha256/single_nochanged/repo.git/objects/pack/pack-d335453f760b064e36459d780ec9bf0e5dd596c0ee1ac6310136067c4f13438b.bitmap b/format/commitgraph/read/testdata/fixtures/sha256/single_nochanged/repo.git/objects/pack/pack-d335453f760b064e36459d780ec9bf0e5dd596c0ee1ac6310136067c4f13438b.bitmap Binary files differindex 53530f4c..53530f4c 100644 --- a/format/commitgraph/testdata/fixtures/sha256/single_nochanged/repo.git/objects/pack/pack-d335453f760b064e36459d780ec9bf0e5dd596c0ee1ac6310136067c4f13438b.bitmap +++ b/format/commitgraph/read/testdata/fixtures/sha256/single_nochanged/repo.git/objects/pack/pack-d335453f760b064e36459d780ec9bf0e5dd596c0ee1ac6310136067c4f13438b.bitmap diff --git a/format/commitgraph/testdata/fixtures/sha256/single_nochanged/repo.git/objects/pack/pack-d335453f760b064e36459d780ec9bf0e5dd596c0ee1ac6310136067c4f13438b.idx b/format/commitgraph/read/testdata/fixtures/sha256/single_nochanged/repo.git/objects/pack/pack-d335453f760b064e36459d780ec9bf0e5dd596c0ee1ac6310136067c4f13438b.idx Binary files differindex b3a417a8..b3a417a8 100644 --- a/format/commitgraph/testdata/fixtures/sha256/single_nochanged/repo.git/objects/pack/pack-d335453f760b064e36459d780ec9bf0e5dd596c0ee1ac6310136067c4f13438b.idx +++ b/format/commitgraph/read/testdata/fixtures/sha256/single_nochanged/repo.git/objects/pack/pack-d335453f760b064e36459d780ec9bf0e5dd596c0ee1ac6310136067c4f13438b.idx diff --git a/format/commitgraph/testdata/fixtures/sha256/single_nochanged/repo.git/objects/pack/pack-d335453f760b064e36459d780ec9bf0e5dd596c0ee1ac6310136067c4f13438b.pack b/format/commitgraph/read/testdata/fixtures/sha256/single_nochanged/repo.git/objects/pack/pack-d335453f760b064e36459d780ec9bf0e5dd596c0ee1ac6310136067c4f13438b.pack Binary files differindex d8dcedbf..d8dcedbf 100644 --- a/format/commitgraph/testdata/fixtures/sha256/single_nochanged/repo.git/objects/pack/pack-d335453f760b064e36459d780ec9bf0e5dd596c0ee1ac6310136067c4f13438b.pack +++ b/format/commitgraph/read/testdata/fixtures/sha256/single_nochanged/repo.git/objects/pack/pack-d335453f760b064e36459d780ec9bf0e5dd596c0ee1ac6310136067c4f13438b.pack diff --git a/format/commitgraph/testdata/fixtures/sha256/single_nochanged/repo.git/objects/pack/pack-d335453f760b064e36459d780ec9bf0e5dd596c0ee1ac6310136067c4f13438b.rev b/format/commitgraph/read/testdata/fixtures/sha256/single_nochanged/repo.git/objects/pack/pack-d335453f760b064e36459d780ec9bf0e5dd596c0ee1ac6310136067c4f13438b.rev Binary files differindex e50d1a81..e50d1a81 100644 --- a/format/commitgraph/testdata/fixtures/sha256/single_nochanged/repo.git/objects/pack/pack-d335453f760b064e36459d780ec9bf0e5dd596c0ee1ac6310136067c4f13438b.rev +++ b/format/commitgraph/read/testdata/fixtures/sha256/single_nochanged/repo.git/objects/pack/pack-d335453f760b064e36459d780ec9bf0e5dd596c0ee1ac6310136067c4f13438b.rev diff --git a/format/commitgraph/testdata/fixtures/sha256/single_nochanged/repo.git/refs/heads/master b/format/commitgraph/read/testdata/fixtures/sha256/single_nochanged/repo.git/refs/heads/master index a4e184b4..a4e184b4 100644 --- a/format/commitgraph/testdata/fixtures/sha256/single_nochanged/repo.git/refs/heads/master +++ b/format/commitgraph/read/testdata/fixtures/sha256/single_nochanged/repo.git/refs/heads/master diff --git a/reachability/ancestor.go b/reachability/ancestor.go index 5c978bf4..98a2c080 100644 --- a/reachability/ancestor.go +++ b/reachability/ancestor.go @@ -3,7 +3,7 @@ package reachability import ( "errors" - "codeberg.org/lindenii/furgit/format/commitgraph" + commitgraphread "codeberg.org/lindenii/furgit/format/commitgraph/read" "codeberg.org/lindenii/furgit/objectid" ) @@ -57,7 +57,7 @@ func (r *Reachability) isAncestorGraph(ancestor, descendant objectid.ObjectID) ( ancestorPos, err := r.graph.Lookup(ancestor) if err != nil { - var notFound *commitgraph.ErrNotFound + var notFound *commitgraphread.ErrNotFound if errors.As(err, ¬Found) { return false, false, nil } @@ -67,7 +67,7 @@ func (r *Reachability) isAncestorGraph(ancestor, descendant objectid.ObjectID) ( descendantPos, err := r.graph.Lookup(descendant) if err != nil { - var notFound *commitgraph.ErrNotFound + var notFound *commitgraphread.ErrNotFound if errors.As(err, ¬Found) { return false, false, nil } @@ -81,8 +81,8 @@ func (r *Reachability) isAncestorGraph(ancestor, descendant objectid.ObjectID) ( } ancestorGeneration := ancestorCommit.GenerationV2 - stack := []commitgraph.Position{descendantPos} - visited := make(map[commitgraph.Position]struct{}, 64) + stack := []commitgraphread.Position{descendantPos} + visited := make(map[commitgraphread.Position]struct{}, 64) for len(stack) > 0 { pos := stack[len(stack)-1] diff --git a/reachability/reachability.go b/reachability/reachability.go index 1180e32a..f9dab764 100644 --- a/reachability/reachability.go +++ b/reachability/reachability.go @@ -2,7 +2,7 @@ package reachability import ( - "codeberg.org/lindenii/furgit/format/commitgraph" + commitgraphread "codeberg.org/lindenii/furgit/format/commitgraph/read" "codeberg.org/lindenii/furgit/objectstore" ) @@ -11,7 +11,7 @@ import ( // It is not safe for concurrent use. type Reachability struct { store objectstore.Store - graph *commitgraph.Reader + graph *commitgraphread.Reader } // New builds a Reachability over one object store. @@ -21,6 +21,6 @@ func New(store objectstore.Store) *Reachability { // NewWithCommitGraph builds a Reachability over one object store with an // optional commit-graph reader for faster commit-domain traversal. -func NewWithCommitGraph(store objectstore.Store, graph *commitgraph.Reader) *Reachability { +func NewWithCommitGraph(store objectstore.Store, graph *commitgraphread.Reader) *Reachability { return &Reachability{store: store, graph: graph} } diff --git a/reachability/walk_expand_commits_graph.go b/reachability/walk_expand_commits_graph.go index 15780c8e..bbdc0ade 100644 --- a/reachability/walk_expand_commits_graph.go +++ b/reachability/walk_expand_commits_graph.go @@ -3,7 +3,7 @@ package reachability import ( "errors" - "codeberg.org/lindenii/furgit/format/commitgraph" + commitgraphread "codeberg.org/lindenii/furgit/format/commitgraph/read" "codeberg.org/lindenii/furgit/objectid" "codeberg.org/lindenii/furgit/objecttype" ) @@ -11,7 +11,7 @@ import ( func (walk *Walk) expandCommitsFromGraph(id objectid.ObjectID) ([]walkItem, bool, error) { pos, err := walk.reachability.graph.Lookup(id) if err != nil { - var notFound *commitgraph.ErrNotFound + var notFound *commitgraphread.ErrNotFound if errors.As(err, ¬Found) { return nil, false, nil } |
