pre-commit-ci / issues

public issues for https://pre-commit.ci
17 stars 4 forks source link

fatal couldn't find remote ref <short sha> (failure to fetch short shas) #12

Closed Mause closed 3 years ago

Mause commented 4 years ago
fetch attempt 1...
    => error
    fatal: couldn't find remote ref b59a524
fetch attempt 2...
    => error
    fatal: couldn't find remote ref b59a524
fetch attempt 3...
    => error
    fatal: couldn't find remote ref b59a524

This is on my repository Mause/media, I'm not really sure where to start debugging this?

asottile commented 4 years ago

can you provide a link to the run?

asottile commented 4 years ago

hmm ok I found it, that error message should definitely be improved either way!

it's referring to this here it looks like: https://github.com/Mause/media/blob/c4b4fb64f203766db62e4c7ae2bfee660b1564f0/.pre-commit-config.yaml#L38

interesting, I made an optimization in pre-commit.ci that isn't in pre-commit itself when fetching. but it looks like github doesn't properly advertise short shas

a workaround is to use the full revision: b59a5246577346e6da2cc2802015f08524abf545 -- though I will fix this to do a full fetch instead. I'll probably need to do some research to limit the size of the history after the fact to keep the repo sizes small but it should be doable

thanks for the report!

Mause commented 4 years ago

Yep, that fixed it, cheers!

asottile commented 3 years ago

this should be fixed now! thanks again for the report: