index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
-rwxr-xr-x | bin/nit-picker | 26 |
diff --git a/bin/nit-picker b/bin/nit-picker index 1dea301..647bfca 100755 --- a/bin/nit-picker +++ b/bin/nit-picker @@ -163,11 +163,27 @@ while pgrep -x ii >/dev/null \ fi # shellcheck disable=SC2154 if ! git -C "${git_dir}" merge-base --is-ancestor "${git_rev}" "${git_head}" 2> /dev/null; then - printf 'commit %s is not an ancestor of HEAD %s in repository %s\n' \ - "${git_rev}" \ - "${git_head}" \ - "${git_repo}" \ - | irc_say + current_git_head=$( + # shellcheck disable=SC2016 + { + printf 'SELECT DISTINCT' + printf ' `git_repositories`.`head`' + printf ' FROM `git_repositories`' + printf ' WHERE `git_repositories`.`name`=from_base64("%s");\n' \ + "$( + printf '%s' "${git_repo}" \ + | base64 -w0 + )" + } \ + | mysql_run_query + ) + if ! git -C "${git_dir}" merge-base --is-ancestor "${git_rev}" "${current_git_head}" 2> /dev/null; then + printf 'commit %s is not an ancestor of HEAD %s in repository %s\n' \ + "${git_rev}" \ + "${current_git_head}" \ + "${git_repo}" \ + | irc_say + fi fi ;; 'binary-dependencies') |