From owner-svn-src-stable-11@freebsd.org Tue Sep 5 00:46:52 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C1B5E05718; Tue, 5 Sep 2017 00:46:52 +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 mx1.freebsd.org (Postfix) with ESMTPS id 18CCC6801D; Tue, 5 Sep 2017 00:46:52 +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 v850kpDG060957; Tue, 5 Sep 2017 00:46:51 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v850kpRW060956; Tue, 5 Sep 2017 00:46:51 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709050046.v850kpRW060956@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 5 Sep 2017 00:46:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323168 - stable/11/sys/conf X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/conf X-SVN-Commit-Revision: 323168 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Sep 2017 00:46:52 -0000 Author: emaste Date: Tue Sep 5 00:46:50 2017 New Revision: 323168 URL: https://svnweb.freebsd.org/changeset/base/323168 Log: MFC r322798: newvers.sh: accommodate `git worktree` newvers.sh looks for a .vcs subdirectory (e.g. .git, .svn) to determine which vcs info tool to run (e.g., git rev-parse, svn info). (As of r308789 in head / r323167 in stable/11 if a .vcs subdirectory is not found at ${TOPDIR} then newvers.sh walks up successive parent directories, testing for the .vcs subdirectory at each step. This is done in case the FreeBSD source is built in a subdirectory as part of some larger project, but either way newvers.sh still tests for the .vcs subdirectory.) However, when using git worktree there is no .git subdirectory but rather a plain text .git file which contains a reference to the main working tree. Change findvcs() to test that the .vcs entry exists, regardless of type. Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/conf/newvers.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/newvers.sh ============================================================================== --- stable/11/sys/conf/newvers.sh Tue Sep 5 00:44:04 2017 (r323167) +++ stable/11/sys/conf/newvers.sh Tue Sep 5 00:46:50 2017 (r323168) @@ -62,7 +62,7 @@ findvcs() savedir=$(pwd) cd ${SYSDIR}/.. while [ $(pwd) != "/" ]; do - if [ -d "./$1" ]; then + if [ -e "./$1" ]; then VCSDIR=$(pwd)"/$1" cd ${savedir} return 0