1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-18 00:10:04 +00:00

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
This commit is contained in:
Rene Ladan 2021-04-08 17:18:22 +02:00
parent b7cc041430
commit ce196940be

View File

@ -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() {