summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meta/packages/linux/linux-wrs_git.bb19
1 files changed, 17 insertions, 2 deletions
diff --git a/meta/packages/linux/linux-wrs_git.bb b/meta/packages/linux/linux-wrs_git.bb
index c8d362571..eaa8e4447 100644
--- a/meta/packages/linux/linux-wrs_git.bb
+++ b/meta/packages/linux/linux-wrs_git.bb
@@ -65,8 +65,23 @@ do_wrlinux_checkout() {
rm -rf ${S}
mkdir ${S}
mv ${WORKDIR}/.git ${S}
- mv ${S}/.git/refs/remotes/origin/* ${S}/.git/refs/heads
- rmdir ${S}/.git/refs/remotes/origin
+
+ if [ -e ${S}/.git/packed-refs ]; then
+ cd ${S}
+ rm -f .git/refs/remotes/origin/HEAD
+IFS='
+';
+
+ for r in `git show-ref | grep remotes`; do
+ ref=`echo $r | cut -d' ' -f1`;
+ b=`echo $r | cut -d'/' -f4`;
+ echo $ref > .git/refs/heads/$b
+ done
+ cd ..
+ else
+ mv ${S}/.git/refs/remotes/origin/* ${S}/.git/refs/heads
+ rmdir ${S}/.git/refs/remotes/origin
+ fi
fi
cd ${S}
git checkout -f ${WRMACHINE}-${LINUX_KERNEL_TYPE}