src-d / go-git

Project has been moved to: https://github.com/go-git/go-git
https://github.com/go-git/go-git
Apache License 2.0
4.91k stars 542 forks source link

plumbing: format/commitgraph, add APIs for reading and writing commit-graph files #1128

Closed filipnavara closed 5 years ago

filipnavara commented 5 years ago

Contributes to #965. This implements the low-level API for reading and writing the commit-graph files. Test cases are submitted in https://github.com/src-d/go-git-fixtures/pull/16.

At the moment it doesn't allow adding custom chunks to the commit-graph file or reading them. The specification allows it and it should probably be supported since I used it for experiments before. However, Git itself doesn't write any non-standard chunks as of version 2.21.

filipnavara commented 5 years ago

How can I make the CI pick up more recent go-git-fixtures? I'm not sure whether go.mod is still used since newer Go ignores it by default and it was not updated for ages in go-git repository.

The actual coverage is 81.7% of statements, above the go-git average. Only error paths are not fully tested.

mcuadros commented 5 years ago

https://github.com/src-d/go-git/pull/1131

filipnavara commented 5 years ago

Thanks, I rebased it and now it will hopefully pick up the new fixtures on CI.