# Error with the test in Stage 6 with Kotlin

**URL:** <https://forum.codecrafters.io/t/error-with-the-test-in-stage-6-with-kotlin/15399>\
**Category:** Challenges\
**Tags:** challenge:git\
**Created:** [October 13, 2025, 9:55am UTC](https://forum.codecrafters.io/t/error-with-the-test-in-stage-6-with-kotlin/15399 "2025-10-13T09:55:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sajeg](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/sajeg/32/18512_2.png) [@Sajeg](https://forum.codecrafters.io/u/Sajeg)\
**Post date:** [October 13, 2025, 9:55am UTC](https://forum.codecrafters.io/t/error-with-the-test-in-stage-6-with-kotlin/15399/1 "2025-10-13T09:55:34Z")

</div>

Hello there,

At the moment I’m doing the git challenge with Kotlin. However with the test on Stage 6 there seems to be an issue. The output of the tester is like that:

```auto
[compile] Compilation successful.
[tester::#JM9] Running tests for Stage #JM9 (Create a commit)
[tester::#JM9] $ ./your_program.sh commit-tree <tree_sha> -p <commit_sha> -m <message>
[your_program] Logs from your program will appear here!
[your_program] 8e8bcb22492c7c5eec52806a1bce8e0bc0969c59
[tester::#JM9] Expected "1bd9e79494d90f7fd02c25a1699c2abeccd26a2d" as tree, got: "0000000000000000000000000000000000000000"
[tester::#JM9] Test failed (try setting 'debug: true' in your codecrafters.yml to see more details)

```

Here is a link to my git repo: [GitHub - Sajeg/codecrafters-git-kotlin](https://github.com/Sajeg/codecrafters-git-kotlin)

It also could be that I’m wrong and there is nothing wrong with the tester.

Thank you in advance for taking your time to read this,  
Yours, Sajeg

---

<div class="post-metadata">

**Author:** ![andy1li](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/andy1li/32/10_2.png) [@andy1li](https://forum.codecrafters.io/u/andy1li)\
**Post date:** [October 15, 2025, 10:47am UTC](https://forum.codecrafters.io/t/error-with-the-test-in-stage-6-with-kotlin/15399/4 "2025-10-15T10:47:49Z")

</div>

Hey @Sajeg, I tried running your code locally:

 ![image](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/3X/0/5/05daffd023396a70a3a9bd9ddb448b80cb7cb299.png)

The result didn’t quite look right:

 ![image](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/3X/b/1/b1a13f1e74d00f7b7e73ddd86e0e381797a2124f.png)

A correct commit object would look like this:

 ![image](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/3X/3/a/3aa451a14b74c788ca360b35b0c1680256930275.png)

Let me know if you’d like any further clarification!

---

<div class="post-metadata">

**Author:** ![Sajeg](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/sajeg/32/18512_2.png) [@Sajeg](https://forum.codecrafters.io/u/Sajeg)\
**Post date:** [October 15, 2025, 2:32pm UTC](https://forum.codecrafters.io/t/error-with-the-test-in-stage-6-with-kotlin/15399/6 "2025-10-15T14:32:34Z")

</div>

Thank you for your reply. You were right I mixed up the parsing of the hashes because in the lesson before I needed to parse the raw hashes.

Thank you for helping me and have a nice rest of your day!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/3X/7/0/700657133935c15703e22c7c8870394f6e6dc27d.svg) [@system](https://forum.codecrafters.io/u/system)\
**Post date:** [October 20, 2025, 2:32pm UTC](https://forum.codecrafters.io/t/error-with-the-test-in-stage-6-with-kotlin/15399/7 "2025-10-20T14:32:50Z")

</div>

Closed on October 20, 2025, 2:32pm UTC

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.
