diff options
author | Erich Eckner <git@eckner.net> | 2018-04-11 15:44:07 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-04-11 15:44:07 +0200 |
commit | 044f83dea8fa8a4d3ca4fe7c0dfa54b64c1c382c (patch) | |
tree | 8eb243660740629783ac6944e2d3a9aaf1907b52 | |
parent | fa0061db154a22597ca3f43d8a0de73160205642 (diff) | |
download | builder-044f83dea8fa8a4d3ca4fe7c0dfa54b64c1c382c.tar.xz |
lib/mysql-functions: mysql_add_package_source: fall back on complete history if commit_time not determinable between old_git_revision and git_revision (git_mod_revision might have been updated)
-rwxr-xr-x | lib/mysql-functions | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/mysql-functions b/lib/mysql-functions index 04ee14a..9bb01f1 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -115,6 +115,12 @@ mysql_add_package_source() { commit_time=$( git -C "${repo_path}" log -n 1 --pretty=format:%ct "${old_git_revision}${git_revision}" -- "${pkgbuild}" ) + if [ -z "${commit_time}" ]; then + # We may have modified git_mod_revision! + commit_time=$( + git -C "${repo_path}" log -n 1 --pretty=format:%ct "${git_revision}" -- "${pkgbuild}" + ) + fi else uses_upstream=0 commit_time=$(date '+%s') |