index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-05-04 10:28:18 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-05-04 10:28:18 +0200 |
commit | 0b8656d1089ff62c3e1582fe9c4db92b5e7ef7cf (patch) | |
tree | 435efd4cc044108b365c6105075361fb4c6fa9f7 /lib/common-functions | |
parent | d3b57f2ec2fdf952bee8470c2de22e954e9cae12 (diff) |
-rwxr-xr-x | lib/common-functions | 43 |
diff --git a/lib/common-functions b/lib/common-functions index b524ab6..2cf4e22 100755 --- a/lib/common-functions +++ b/lib/common-functions @@ -574,49 +574,6 @@ mangle_pkgbuild() { ' "${PKGBUILD}" } -# find_newest_of_git_revisions -# find newest git revision of the ones provided at stdin -# (assuming linear history) - -find_newest_of_git_revisions() { - local revisions - local repo - revisions=$(cat) - - if [ "$( - echo "${revisions}" | \ - wc -l - )" -eq 1 ]; then - - echo "${revisions}" - return - - fi - - repo=$( - find_repository_with_commit \ - "$( - echo "${revisions}" | \ - grep -xm1 '[0-9a-f]\{40\}' - )" - ) - - eval 'repo="${repo_paths__'"${repo}"'}"' - - echo "${revisions}" | \ - xargs -rn1 git -C "${repo}" rev-parse | \ - { - newest='' - while read -r current; do - if [ -z "${newest}" ] || \ - git -C "${repo}" merge-base --is-ancestor "${newest}" "${current}"; then - newest="${current}" - fi - done - echo "${newest}" - } -} - # find_package_repository_to_package $package $git_repository $git_commit # find the package repository a package from a given git repository # belongs to |