From: Junio C Hamano Date: Sat, 26 Nov 2005 02:22:00 GMT Subject: Re: [PATCH] Rename git-config-set to git-repo-config Message-ID: <7vy83cdu7r.fsf@assigned-by-dhcp.cox.net> In-Reply-To: Johannes Schindelin writes: >> - Natively, they work only from the project toplevel. Period. > > How about changing *that*? I once advocated for an environment to name the top of working tree directory --- it might make sense to resurrect that one. "natively" was a bad choice of word. What I meant by the above was that the core library part (what is in read-cache, sha1_file, etc) works on canonical path, which is defined to be project toplevel relative. I do not think changing that is wise nor necessary. The setup_git_directory() interface is a good way to take path arguments given by the end user and convert them into canonical path form. So instead of punting when GIT_DIR is specified that we have no way knowing where the working tree top is, we could use GIT_WORKING_TREE, if exists, and use that location as the toplevel when we need to access the working tree. That implies we chdir() to that directory and do necessary prefix adjustments before returning. But I'd rather postpone that after 1.0.