[client] Fix a bug in creating commits.

Test case:
Add a file larger than 100MB, after uploading the file,
the repo will continuouly get into committing state without anything to commit.