commit: Wait for the git-log(1) process to exit in FindCommits
In this commit, we add a new wait logic to wait for git-log(1) command to finish; we also fix the test cases.
Previously we did not Wait() for the git-log(1) process to exit in FindCommits, causing us to fail to include its execution time in the command details and not log any errors it returned.
Changelog: fixed
Closes: #5671 (closed)