ExternalProject: support git clone shallow with specified SHA1 ID
Git clone shallow with a SHA1 ID is not working when the SHA1 ID is not referring to the last branch commit. This patch allow to only clone a specific SHA1 ID using the GIT_SHALLOW option (--depth). The trick is to not use git clone but to use git fetch instead
- create directory
git init
git remote add <git_remote_name> <git_repository>
git fetch --depth 1 <git_remote_name> <git_tag>
git checkout FETCH_HEAD
Issue: #23379
Signed-off-by: Vincent ABRIOU vincent.abriou@st.com
Edited by Brad King