When I used the execCommand method to execute the git command "git show --textconv HEAD:README.md" in order to retrieve the content of a file, I noticed that it trimmed any empty lines at the beginning and end of the file.
This issue has been reported in ssh2 and more details can be found there. But it's not issue of ssh2.