Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Nov 2018 17:20:01 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r340255 - head/sys/conf
Message-ID:  <201811081720.wA8HK1tP048118@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Thu Nov  8 17:20:00 2018
New Revision: 340255
URL: https://svnweb.freebsd.org/changeset/base/340255

Log:
  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

Modified:
  head/sys/conf/newvers.sh

Modified: head/sys/conf/newvers.sh
==============================================================================
--- head/sys/conf/newvers.sh	Thu Nov  8 17:00:05 2018	(r340254)
+++ head/sys/conf/newvers.sh	Thu Nov  8 17:20:00 2018	(r340255)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811081720.wA8HK1tP048118>