From owner-svn-src-head@FreeBSD.ORG Mon Jan 14 22:57:03 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id EABF2E33; Mon, 14 Jan 2013 22:57:03 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id B1C81175; Mon, 14 Jan 2013 22:57:03 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 00FDD3592EF; Mon, 14 Jan 2013 23:57:01 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id E0A762848C; Mon, 14 Jan 2013 23:57:00 +0100 (CET) Date: Mon, 14 Jan 2013 23:57:00 +0100 From: Jilles Tjoelker To: Eitan Adler Subject: Re: svn commit: r245426 - head/bin/sh Message-ID: <20130114225700.GA93645@stack.nl> References: <201301141640.r0EGepLc050623@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2013 22:57:04 -0000 On Mon, Jan 14, 2013 at 01:38:51PM -0500, Eitan Adler wrote: > On 14 January 2013 11:40, Jilles Tjoelker wrote: > > Author: jilles > > Date: Mon Jan 14 16:40:50 2013 > > New Revision: 245426 > > URL: http://svnweb.freebsd.org/changeset/base/245426 > > Log: > > sh: Simplify cd-hash interaction. > > Instead of rechecking relative paths for all hashed utilities after a cd, > > track if any utility in cmdtable depends on a relative path in PATH. > > If there is such a utility, cd clears the entire table. > Why not clear just these entries instead of the entire table? Clearing too much might affect performance but not correctness. The utilities will be looked up again if necessary. Because it is uncommon nowadays to include a relative pathname in PATH, I handle this case in a very simple manner. -- Jilles Tjoelker