It turns out that ```${current_commit_hash_abbrev}``` is never assigned.
I think the line should be 

```
oh_my_git_string="${oh_my_git_string}${detached_current_commit_color}(${current_commit_hash:0:7})${reset}";
```

(with the ```:0:7``` and without the extra ```\```)

Alternatively, the ```${current_commit_hash_abbrev}``` must be defined.
Since you introduced a new variable, I suppose you just missed a line.