Commit b1efe7ae authored by Zach van Rijn's avatar Zach van Rijn
Browse files

cgit.a.o: display all branches

parent 958711cd
......@@ -32,8 +32,15 @@ sync ()
cd "${DATA}";
mkdir -p ${1};
cd ${1};
test -d ${name%.*} || git clone ${repo} ${name%.*};
(cd ${name%.*} && git pull && printf > .git/description "%s" "${desc}");
if ! test -d ${name%.*}; then
mkdir ${name%.*};
git clone --mirror ${repo} ${name%.*}/.git;
git -C ${name%.*} config remote.origin.fetch +refs/heads/*:refs/heads/*;
git -C ${name%.*} config --add remote.origin.fetch +refs/tags/*:refs/tags/*;
else
git -C ${name%.*} remote update --prune;
fi
printf > ${name%.*}/.git/description "%s" "${desc}";
printf >> "${HAVE}" "%s/%s\n" "${1}" "${name%.*}";
)
done < "${KEEP}";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment