summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-10-10 10:40:56 +0200
committerErich Eckner <git@eckner.net>2017-10-10 10:40:56 +0200
commit3a2f7c8efd50dc7eb4b0f6a7263fecf310ac9acd (patch)
treee9f98815bd024125b0d5d0767f48cf6cca781c9e
parentbbf4339a3bd6c188861b74c4fdd3f3ffa2aa5b5e (diff)
downloadbuilder-3a2f7c8efd50dc7eb4b0f6a7263fecf310ac9acd.tar.xz
bin/get-package-updates, conf/default.conf: switch to bare repositories
-rwxr-xr-xbin/get-package-updates12
-rwxr-xr-xconf/default.conf2
2 files changed, 6 insertions, 8 deletions
diff --git a/bin/get-package-updates b/bin/get-package-updates
index 96c24f0..ab96abc 100755
--- a/bin/get-package-updates
+++ b/bin/get-package-updates
@@ -86,13 +86,7 @@ delete_package() {
for repo in ${repo_names}; do
eval repo_path='"${repo_paths__'"${repo}"'}"'
- # TODO: this is somewhat redundant and slow -- improve git performance!
- git -C "${repo_path}" checkout -f master
- git -C "${repo_path}" clean -xdf
git -C "${repo_path}" fetch
- if ${pull}; then
- git -C "${repo_path}" reset --hard origin/master
- fi
done
# Read previous git revision numbers from files.
@@ -106,7 +100,11 @@ for repo in ${repo_names}; do
)'"
eval repo_path='"${repo_paths__'"${repo}"'}"'
eval "new_repo_revisions__${repo}='$(
- git -C "${repo_path}" rev-parse HEAD | \
+ if ${pull}; then
+ git -C "${repo_path}" rev-parse HEAD
+ else
+ cat "${work_dir}/${repo}.revision"
+ fi | \
tee "${work_dir}/${repo}.revision.new"
)'"
if ! eval '[ "${new_repo_revisions__'"${repo}"'}" = "${old_repo_revisions__'"${repo}"'}" ]'; then
diff --git a/conf/default.conf b/conf/default.conf
index fa391d1..c58849d 100755
--- a/conf/default.conf
+++ b/conf/default.conf
@@ -118,7 +118,7 @@ for repo in ${repo_names}; do
else
repo_source="git://git.archlinux.org/svntogit/${repo}.git"
fi
- git clone "${repo_source}" "${repo_path}"
+ git clone --bare "${repo_source}" "${repo_path}"
fi
done