antis81/libqgit2 — comment on commit a490f8b58a4f0515b39b61faacd8880edcaac448
File:  line 0
By antis81:

Thanks for the comments. In both cases oid.isValid() would work as expected. It returns true if d.length > 0 and d != 20 zeros and d.length == 20 (should better be <= 20).

I agree with you, that the real deal is, that d.length is always 20. How about setting the length to qMin(GIT_OID_RAWSZ, param.length)?

The fromString method a.k.a the c'tor should fail and assign nothing, if the oid is longer than 20 byte. Actually I'm currently just using complete 20 byte oid's.

Oh, I just see your fix comment. Will have a look at it.