aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2020-12-17 00:00:21 +0000
committerBrooks Davis <brooks@FreeBSD.org>2020-12-17 00:00:21 +0000
commit029ca1842fa44869a866faef0fb0da0ae82e3193 (patch)
treef596ef10b28d7af1fe7f0d7ed0afaaa0f44fec8f
parentd8462732ce74ccaf077dac625168cfa75f4a3b7e (diff)
Notes
-rw-r--r--sys/conf/newvers.sh24
1 files changed, 1 insertions, 23 deletions
diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index 8e41fcfa94a3..f5e34b4946a5 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -162,29 +162,7 @@ findvcs()
git_tree_modified()
{
- # git diff-index lists both files that are known to have changes as
- # well as those with metadata that does not match what is recorded in
- # git's internal state. The latter case is indicated by an all-zero
- # destination file hash.
-
- local fifo
-
- fifo=$(mktemp -u)
- mkfifo -m 600 $fifo || exit 1
- $git_cmd --work-tree=${VCSTOP} diff-index HEAD > $fifo &
- while read smode dmode ssha dsha status file; do
- if ! expr $dsha : '^00*$' >/dev/null; then
- rm $fifo
- return 0
- fi
- if ! $git_cmd --work-tree=${VCSTOP} diff --quiet -- "${file}"; then
- rm $fifo
- return 0
- fi
- done < $fifo
- # No files with content differences.
- rm $fifo
- return 1
+ $git_cmd "--work-tree=${VCSTOP}" -c core.checkStat=minimal -c core.fileMode=off diff --quiet
}
LC_ALL=C; export LC_ALL