summaryrefslogtreecommitdiff
path: root/bin/get-package-updates
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 /bin/get-package-updates
parentbbf4339a3bd6c188861b74c4fdd3f3ffa2aa5b5e (diff)
downloadbuilder-3a2f7c8efd50dc7eb4b0f6a7263fecf310ac9acd.tar.xz
bin/get-package-updates, conf/default.conf: switch to bare repositories
Diffstat (limited to 'bin/get-package-updates')
-rwxr-xr-xbin/get-package-updates12
1 files changed, 5 insertions, 7 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