From 044f83dea8fa8a4d3ca4fe7c0dfa54b64c1c382c Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 11 Apr 2018 15:44:07 +0200 Subject: 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) --- lib/mysql-functions | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib') 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') -- cgit v1.2.3-70-g09d2