From owner-svn-src-all@freebsd.org Mon Sep 11 00:14:05 2017 Return-Path: Delivered-To: svn-src-all@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 49B30E0C3B5; Mon, 11 Sep 2017 00:14:05 +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 174E066C20; Mon, 11 Sep 2017 00:14:05 +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 v8B0E4W9015978; Mon, 11 Sep 2017 00:14:04 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8B0E4JA015977; Mon, 11 Sep 2017 00:14:04 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201709110014.v8B0E4JA015977@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 11 Sep 2017 00:14:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323405 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 323405 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.23 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: Mon, 11 Sep 2017 00:14:05 -0000 Author: emaste Date: Mon Sep 11 00:14:04 2017 New Revision: 323405 URL: https://svnweb.freebsd.org/changeset/base/323405 Log: newvers.sh: speed up failing git-svn revision search In the case of running newvers.sh on a git tree w/o git-svn-id notes we previously piped the entire 'git log' to grep. Add --grep to the log invocation to avoid processing log entries of no interest. This saves about 2-3 seconds of newvers.sh run time on my SSD laptop. Later changes will bring further speedups. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Sun Sep 10 23:48:20 2017 (r323404) +++ head/sys/conf/newvers.sh Mon Sep 11 00:14:04 2017 (r323405) @@ -218,8 +218,9 @@ if [ -n "$git_cmd" ] ; then svn=" r${svn}" git="=${git}" else - svn=`$git_cmd log | grep '^ git-svn-id:' | head -1 | \ - sed -n 's/^.*@\([0-9][0-9]*\).*$/\1/p'` + svn=`$git_cmd log --grep '^git-svn-id:' | \ + grep '^ git-svn-id:' | head -1 | \ + sed -n 's/^.*@\([0-9][0-9]*\).*$/\1/p'` if [ -z "$svn" ] ; then svn=`$git_cmd log --format='format:%N' | \ grep '^svn ' | head -1 | \