diff options
author | Parabola git <git@parabola.nu> | 2023-09-22 07:00:03 +0000 |
---|---|---|
committer | Parabola git <git@parabola.nu> | 2023-09-22 07:00:03 +0000 |
commit | 1d1acf6078620de1f9b5ae925bf03f5c7647318e (patch) | |
tree | 14a924817a999df1e3ae11aea5b6335ff1476352 | |
parent | b33155c994a30e1b8194d2879ef17c00d35a0bee (diff) |
Update from cron
-rwxr-xr-x | .config/git/hooks/post-receive.d/notify-pbot-git-hook | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/.config/git/hooks/post-receive.d/notify-pbot-git-hook b/.config/git/hooks/post-receive.d/notify-pbot-git-hook index 0e2ee9b..945a4c6 100755 --- a/.config/git/hooks/post-receive.d/notify-pbot-git-hook +++ b/.config/git/hooks/post-receive.d/notify-pbot-git-hook @@ -67,8 +67,8 @@ ParseRefData() # (prev_sha curr_sha ref_file) fi # collect push details -# local hacker=$( ${LIB_DIR}/last-git-login ) -hacker='' # last-git-login is unreliable + local hacker=$( ${LIB_DIR}/last-git-login ) +#hacker='' # last-git-login is not yet reliable (eg: does not resolve megver) local author="$( git log -1 --format='%an' ${curr_sha} 2> /dev/null)" local log_msg="$(git log -1 --format='%s' ${curr_sha} 2> /dev/null)" local n_behind=$(git rev-list --count ${curr_sha}..${prev_sha} 2> /dev/null) @@ -78,8 +78,8 @@ hacker='' # last-git-login is unreliable LogParseRefData hacker author log_msg n_behind n_ahead n_total ; echo >> ${LOG_FILE} ; # fall-back to author name if the hacker detector fails - [[ -n "${author}" ]] || author='someone' # deletion - [[ -n "${hacker}" ]] || hacker="${author}" # broken/buggy last-hacker-login + [[ -n "${author}" ]] || author='someone' # deletion + [[ -n "${hacker}" ]] || hacker="someone$([[ "${author}" == someone ]] || echo " (maybe ${author})")" # broken/buggy last-git-login " # detect new ref [[ ${prev_sha} =~ ^0{40}$ ]] && n_behind='∞' n_ahead=${n_total} |