aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2018-11-08 17:20:00 +0000
committerMark Johnston <markj@FreeBSD.org>2018-11-08 17:20:00 +0000
commit5186028dc4a2a74d007fa65857667efb2742eaea (patch)
treeb6320d97d273d61c97da6064edbebd10ef5f5e3c
parentba2c34f4f245df0e0142a5216cbc5a98f10a2839 (diff)
downloadsrc-5186028dc4a2a74d007fa65857667efb2742eaea.tar.gz
src-5186028dc4a2a74d007fa65857667efb2742eaea.zip
Use --work-tree instead of specifying an absolute path.
Otherwise the diff command being run from outside the checkout resulted in warnings. Discussed with: emaste X-MFC with: r340083
Notes
Notes: svn path=/head/; revision=340255
-rw-r--r--sys/conf/newvers.sh5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index d8573660d196..a2c8c1ccebda 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -83,18 +83,17 @@ git_tree_modified()
# git's internal state. The latter case is indicated by an all-zero
# destination file hash.
- local fifo vcstop_abs
+ local fifo
fifo=$(mktemp -u)
mkfifo -m 600 $fifo
- vcstop_abs=$(realpath $VCSTOP)
$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 diff --quiet -- "${vcstop_abs}/${file}"; then
+ if ! $git_cmd --work-tree=${VCSTOP} diff --quiet -- "${file}"; then
rm $fifo
return 0
fi