buildpackages: branches are found in refs/remotes/origin

Note in refs/heads which is populated for local branches only and not
after a fresh clone.

Signed-off-by: Loic Dachary <loic@dachary.org>
This commit is contained in:
Loic Dachary 2015-10-09 10:01:34 +02:00
parent e54c916891
commit 810caaf55f
2 changed files with 2 additions and 2 deletions

View File

@ -136,7 +136,7 @@ EOF
echo $sha1 > $sha1_dir/sha1
ref_dir=$codename/$base/ref
mkdir -p $ref_dir
( cd ${ceph_dir} ; git for-each-ref refs/tags/** refs/heads/** ) | grep $sha1 | while read sha1 type ref ; do
( cd ${ceph_dir} ; git for-each-ref refs/tags/** refs/remotes/origin/** ) | grep $sha1 | while read sha1 type ref ; do
base_ref=$(basename $ref)
( cd $ref_dir ; ln -sf ../sha1/$sha1 $base_ref )
done

View File

@ -233,7 +233,7 @@ function build_rpm_repo() {
ref_dir=${buildarea}/../$codename/$base/ref
mkdir -p $ref_dir
( cd ${ceph_dir} ; git for-each-ref refs/tags/** refs/heads/** ) | grep $sha1 | while read sha1 type ref ; do
( cd ${ceph_dir} ; git for-each-ref refs/tags/** refs/remotes/origin/** ) | grep $sha1 | while read sha1 type ref ; do
base_ref=$(basename $ref)
( cd $ref_dir ; ln -sf ../sha1/$sha1 $base_ref )
done