strip and treat as string git cmd result

Test Plan: will add a test

Reviewers: jing, cramer

Reviewed By: cramer

Differential Revision: https://tails.corp.dropbox.com/D56557