From owner-svn-src-all@freebsd.org Fri Jun 29 18:45:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2167F7494F; Fri, 29 Jun 2018 18:45:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 95AD6769EE; Fri, 29 Jun 2018 18:45:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 71E1924A9B; Fri, 29 Jun 2018 18:45:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5TIjTVl046894; Fri, 29 Jun 2018 18:45:29 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5TIjTtW046893; Fri, 29 Jun 2018 18:45:29 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201806291845.w5TIjTtW046893@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 29 Jun 2018 18:45:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335800 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 335800 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jun 2018 18:45:30 -0000 Author: emaste Date: Fri Jun 29 18:45:29 2018 New Revision: 335800 URL: https://svnweb.freebsd.org/changeset/base/335800 Log: newvers.sh: avoid possibly invalid relative directory Previously newvers.sh passed --work-tree=${VCSDIR}/.. when invoking git. When using git worktree .git is actually a file, not a directory, and .git/.. is not a valid path. Although it appears git handles this internally (perhaps it normalizes the path first), it is simple enough for the script to store both the working tree top-level directory and the VCS (.git) directory, so do so. Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Fri Jun 29 17:51:35 2018 (r335799) +++ head/sys/conf/newvers.sh Fri Jun 29 18:45:29 2018 (r335800) @@ -65,7 +65,8 @@ findvcs() cd ${SYSDIR}/.. while [ $(pwd) != "/" ]; do if [ -e "./$1" ]; then - VCSDIR=$(pwd)"/$1" + VCSTOP=$(pwd) + VCSDIR=${VCSTOP}"/$1" cd ${savedir} return 0 fi @@ -239,7 +240,7 @@ if [ -n "$git_cmd" ] ; then if [ -n "$git_b" ] ; then git="${git}(${git_b})" fi - if $git_cmd --work-tree=${VCSDIR}/.. diff-index \ + if $git_cmd --work-tree=${VCSTOP} diff-index \ --name-only HEAD | read dummy; then git="${git}-dirty" modified=true