diff options
| author | Paul Bourke <paul.bourke@oracle.com> | 2015-07-16 18:06:13 +0000 |
|---|---|---|
| committer | Paul Bourke <paul.bourke@oracle.com> | 2015-07-17 11:28:32 +0000 |
| commit | 58678fb2b4e54d275b574a4e57a5b17ff9a820e9 (patch) | |
| tree | be02694d6f98cfc78beb68a8866be339462bc26f | |
| parent | 51b7915ae8094fe149ff1752be01d6ff29fed15e (diff) | |
| download | kolla-58678fb2b4e54d275b574a4e57a5b17ff9a820e9.tar.gz kolla-58678fb2b4e54d275b574a4e57a5b17ff9a820e9.zip | |
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
| -rw-r--r-- | tools/gen-source-tar.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/gen-source-tar.sh b/tools/gen-source-tar.sh index 66c04caf0..c7658d3d2 100644 --- a/tools/gen-source-tar.sh +++ b/tools/gen-source-tar.sh @@ -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} } |
