I’m stuck on Stage #JM9.
I believe I have written a commit, and it generates a commit sha. However, when I push my code to Codecrafters, I get the following odd error:
It appears that my program is generating a commit sha correctly. If I run an additional snippet of code (that will cause the test to fail) trying to retrieve and read the object stored using the commit sha generated, I get output that begins with “commit \0tree <tree_sha>…”, and “<tree_sha>” is not all zeros.
My guess was that the tester is using the sha key generated by the commit step to retrieve and read a commit object to see if the tree sha at the top of that file is the same as the one used to make the commit. But somehow the tester is reading an all-zero key. I do not really understand what is going on. Regardless of whether the commit file is written entirely correctly, I do not see why the tree_sha that is read is all zeros.
Would love to be enlightened here. Cheers!