refine gitinfo.sh

Change-Id: Ib45a9126ff997d43fa83d5ca66c11de2d6e4ea5c