From 3a2f7c8efd50dc7eb4b0f6a7263fecf310ac9acd Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 10 Oct 2017 10:40:56 +0200 Subject: bin/get-package-updates, conf/default.conf: switch to bare repositories --- bin/get-package-updates | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'bin') 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 -- cgit v1.2.3-70-g09d2