Fix checking out custom refs in gen-source-tar
It seems using --git-dir to execute commands on a repo different to where you currently are also inexplicably requires --work-tree (https://stackoverflow.com/questions/1386291/git-git-dir-not-working-as-expected) Change-Id: I42806e7d8a169ad9fc1878a0f4e0c03c57beb88b Closes-Bug: #1475385
This commit is contained in:
parent
51b7915ae8
commit
58678fb2b4
@ -17,7 +17,9 @@ function fetch_source_from_git {
|
||||
git clone --depth=1 ${CLONE_FROM} ${TMPDIR}/${COMPONENT}
|
||||
else
|
||||
git clone ${CLONE_FROM} ${TMPDIR}/${COMPONENT}
|
||||
git --git-dir ${TMPDIR}/${COMPONENT}/.git checkout ${GIT_REF}
|
||||
git --git-dir ${TMPDIR}/${COMPONENT}/.git \
|
||||
--work-tree ${TMPDIR}/${COMPONENT}/ \
|
||||
checkout ${GIT_REF}
|
||||
fi
|
||||
tar -cf ${TMPDIR}/${COMPONENT}.tar -C ${TMPDIR} ${COMPONENT}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user