index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2017-10-10 10:40:56 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-10-10 10:40:56 +0200 |
commit | 3a2f7c8efd50dc7eb4b0f6a7263fecf310ac9acd (patch) | |
tree | e9f98815bd024125b0d5d0767f48cf6cca781c9e /bin/get-package-updates | |
parent | bbf4339a3bd6c188861b74c4fdd3f3ffa2aa5b5e (diff) |
-rwxr-xr-x | bin/get-package-updates | 12 |
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 |