# Issue with the judge in commit phase

**URL:** <https://forum.codecrafters.io/t/issue-with-the-judge-in-commit-phase/4066>\
**Category:** Challenges\
**Tags:** challenge:git\
**Created:** [January 9, 2025, 1:25am UTC](https://forum.codecrafters.io/t/issue-with-the-judge-in-commit-phase/4066 "2025-01-09T01:25:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ArshiAAkhavan](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/arshiaakhavan/32/4122_2.png) [@ArshiAAkhavan](https://forum.codecrafters.io/u/ArshiAAkhavan)\
**Post date:** [January 9, 2025, 1:25am UTC](https://forum.codecrafters.io/t/issue-with-the-judge-in-commit-phase/4066/1 "2025-01-09T01:25:30Z")

</div>

I’m stuck on Stage #JM9.

did anyone face the following problem?

it seems like the judge only checks the last line of git cat-file commit and checks for the commit message and it requires it to “dooby monkey vanilla dooby horsey dooby\n” and the problem is: if I put a ‘\n’ at the end of the commit message, then the last line is an empty “” line so it doesn’t match. if I commit the newline at the end of the commit message, then the commit message won’t match the expected string.

error message when I put the \n at the end: Expected “dooby monkey vanilla dooby horsey dooby\n” as commit message, got: “”

error message when I don’t: Expected “monkey horsey monkey doo doo vanilla\n” as commit message, got: “monkey horsey monkey doo doo vanilla”

---

<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:** [January 9, 2025, 7:15am UTC](https://forum.codecrafters.io/t/issue-with-the-judge-in-commit-phase/4066/3 "2025-01-09T07:15:42Z")

</div>

Hi @ArshiAAkhavan, it seems like you might have accidentally introduced changes that break an earlier stage **#IC4 (Read a blob object)**.

You can use [our CLI](https://docs.codecrafters.io/cli/installation) to test against previous stages by running:

```auto
codecrafters test --previous

```

If you’d like me to review your code, feel free to [upload it to GitHub](https://docs.codecrafters.io/features/publish-to-github) and share the link.

---

<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:** [January 22, 2025, 2:36pm UTC](https://forum.codecrafters.io/t/issue-with-the-judge-in-commit-phase/4066/5 "2025-01-22T14:36:52Z")

</div>

Closing this thread due to inactivity. If you still need assistance, feel free to reopen or start a new discussion!

---

<div class="post-metadata">

**Author:** ![ArshiAAkhavan](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/arshiaakhavan/32/4122_2.png) [@ArshiAAkhavan](https://forum.codecrafters.io/u/ArshiAAkhavan)\
**Post date:** [January 22, 2025, 2:59pm UTC](https://forum.codecrafters.io/t/issue-with-the-judge-in-commit-phase/4066/6 "2025-01-22T14:59:36Z")

</div>

i ended up going through some huge refactors that fixed the problem in the process. thanks though!

---

<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:** [January 27, 2025, 2:59pm UTC](https://forum.codecrafters.io/t/issue-with-the-judge-in-commit-phase/4066/7 "2025-01-27T14:59:50Z")

</div>

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