Date: Thu, 8 Apr 2021 15:25:10 GMT From: Rene Ladan <rene@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: ce196940be57 - main - tindex: fix when INDEX fails and ports are deleted since the last success. Message-ID: <202104081525.138FPAZ4024027@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by rene: URL: https://cgit.FreeBSD.org/ports/commit/?id=ce196940be576646bf30593d6781df3a0170a947 commit ce196940be576646bf30593d6781df3a0170a947 Author: Rene Ladan <rene@FreeBSD.org> AuthorDate: 2021-04-08 15:18:22 +0000 Commit: Rene Ladan <rene@FreeBSD.org> CommitDate: 2021-04-08 15:25:06 +0000 tindex: fix when INDEX fails and ports are deleted since the last success. `git log' cannot get the log of a non-existent file, which the script uses to obtain the last person who touched a port, so check if the file exists before getting its log. This is similar to the Subversion case, which only inspected changed files. The Git version still also checks added ports. While here, call git in blame() using the predefined global variable. Reported by: antoine --- Tools/scripts/tindex | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Tools/scripts/tindex b/Tools/scripts/tindex index 9adbfc4e7b80..cf8eb8c6ce8e 100755 --- a/Tools/scripts/tindex +++ b/Tools/scripts/tindex @@ -42,9 +42,11 @@ fi # -------------------------------------------------------- blame() { - # Find out who is responsible for current version of file $1 + # Find out who is responsible for current version of file $1, if not deleted - git log --no-patch --max-count=1 --format='%ce' $1 + if [ -e $1 ]; then + ${GIT} log --no-patch --max-count=1 --format='%ce' $1 + fi } indexfail() {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104081525.138FPAZ4024027>