cmake: fix build failure when git repo is initialized but no first commit Closes IDFGH-1676 See merge request espressif/esp-idf!5914
cmake: fix build failure when git repo is initialized but no first commit Closes IDFGH-1676 See merge request espressif/esp-idf!5914