commit: Fix potential segfault in git_commit_message

Dereferencing commit pointer before asserting