From: Charles Bailey Date: Wed, 22 Oct 2008 21:09:13 GMT Subject: Re: [RFC PATCH] archive: fix setup to work in bare repositories Message-ID: <20081022210913.GB22541@hashpling.org> In-Reply-To: <20081022203722.GD2015@riemann.deskinm.fdns.net> On Wed, Oct 22, 2008 at 04:37:22PM -0400, Deskin Miller wrote: > cmd_archive was calling git_config -> setup_git_env prior to > write_archive calling setup_git_directory. In a bare repository, the > former will set git_dir to be '.git' since the latter has not > determined that it's operating in a bare repository yet. > > Things are complicated, however, by the fact that git archive --list > should work from anywhere, not just in git repositories, so that > argument needs to be checked for before setup_git_directory is called. Just for some background, I think that this issue might be an unintended consequence of this commit: b99b5b40cffb5269e4aa38b6b60391b55039e27d The only reason that the git_config call has been added is to ensure the correct setting of core.autocrlf before convert_to_working_tree is called on any blobs. I haven't looked in detail, but would moving this call later make for an cleaner change? -- Charles Bailey http://ccgi.hashpling.plus.com/blog/