[U-Boot-Users] [PATCH] tools/setlocalversion test for git and .git directory before running commands

This patch adds commands to tools/setlocalversion to test for a git executable and for a .git directory before running 'git name-rev'. If it finds this condition it will return the string '-unknown' to the calling program.
Running git without a .git directory causes a the build to hang in the make version step with the git program stopped like so $ ps -x | grep git 13750 pts/1 S 0:00 /bin/sh /usr/bin/git rev-parse --verify HEAD
Our particular reason for not having a .git directory is that we use CVS as our standard internal source control. (Machine gets admin'd by someone and backed up nightly), so we have a git pull that we periodically import into CVS as a vendor branch. I think this patch would still be useful for vendors who distribute their source tree to end users who may or may not have git (and those who make tar files and forget hidden directories ;-)
Signed-off-by: Andrew Dyer amdyer@gmail.com
participants (1)
-
Andrew Dyer