What did I do in this period?

During this week, I sent t-oidmap migration patch to the mailing list. It is still waiting for a review, but hopefully it will get reviewed in the next week and be merged to at least ‘seen’. Apart from that, I also migrated helper/test-hashmap.c to unit-tests/t-hashmap.c. That is ready to be sent to the mailing list, but I’ll send it in the coming week to give some time to t-oidmap to be reviewed and not spam the list.

Apart from that, I also migrated helper/test-urlmatch-normalization.c to unit-tests/t-urlmatch-normalization, but there are still some minor things to polish out in that patch. Also you might remember from my previous blog that I am waiting on ps/use-the-repository to be merged to next so that I can send out t-oid-array.c which is ready in my tree. And from the latest ‘What’s cooking’, it is to be merged to ’next’ soon, so I’ll probably send out that patch as well in the coming week.

There were no particular difficulties that I faced in this week. It was rather smooth as I migrated two legacy tests to the unit tests. To give a bird’s eye view of the progress:

With all said and done, I gave an estimate of five to six tests to migrate in my original proposal before the halfway. And I am probably on track to that fulfill that estimate.

Also, In one of the above patches, t-hash, I did not remove the old helpers test-{sha1, sha256, hash} due to them having other dependents. And one of them was t0013-sha1dc.sh which tested git’s implementation of SHA1-DC to detect collision which can occur in SHA1. It namely tests against an attack known as SHAttered, which can craft two colliding PDFs and obtain a SHA-1 digital signature on the first PDF file which can also be abused as a valid signature on the second PDF file. Patrick suggested on the mailing list that we might be able to use git-hash-object to replace this test-hash helper which is used in t0013-sha1dc.sh. However, when passing those PDFs to git-hash-object, it did not detect any collision. And when I asked on the mailing list about it, Jeff King (alias Peff) gave a detailed explanation and clarification that when working with git-hash-object, it appends object type and size to the content. So, it is not a straight forward hashing of the content, therefore git-hash-object cannot be used for this purpose. In fact, there is no git command which can hash arbitrary content without modifying it. So, in sum, those helpers cannot be removed as we’d need some mechanism for hashing arbitrary data.

So what is the plan ahead?

For the next week, I plan to finish writing t-urlmatch-normalization and also reiterate, if necessary based on the reviews, on t-oidmap, t-oid-array and t-hashmap. Apart from that, I have been meaning to work on lib-repo but it keeps taking the backseat due to other test migrations. I’ll try to see if I can write up a working version of that in the late next week.

That’s it for now. See ya’ next week!