crashappsec / chalk

Chalk allows you to follow code from development, through builds and into production.
https://crashoverride.com/
GNU General Public License v3.0
322 stars 11 forks source link

fix(git): git packed objects/refs #341

Closed miki725 closed 2 weeks ago

miki725 commented 3 weeks ago

Issue

annotated tags are not reported when cloning repo in CI (github)

fixes https://github.com/crashappsec/chalk/issues/332 fixes https://github.com/crashappsec/chalk/issues/342

Description

Packed git object does not store normal object header.
When reading file from the pack, chalk now adds back normal object
header for consistent parsing so its irrelevant where the object
content was grabbed from.

In addition `git pack-refs` packs all refs in .git/refs/ into
.git/packed-refs which chalk now honors as well.
Otherwise chalk would presume it was an empty git repo.

Testing

✗ make tests args="test_git.py::test_repo --logs -x"
ee7 commented 2 weeks ago

Confirmed locally that this fixes what I was seeing with https://github.com/crashappsec/chalk/issues/332 and https://github.com/crashappsec/chalk/issues/342.