[Hot Fix] Fix a bug in diff. Fixes checkout issue.

This fixes a `git checkout failure`.

#2597 

@dinhviethoa