Re: [PATCH v7 01/33] setup: call setup_git_directory_gently before accessing refs

2016-03-01 Thread Jeff King
On Tue, Mar 01, 2016 at 06:47:52PM -0500, David Turner wrote: > > My fix for this was to teach read_mailmap to avoid looking for > > HEAD:.mailmap if we are not in a repository, but to continue with the > > others (.mailmap in the cwd, and the mailmap.file config variable). > > ... > > But I do th

Re: [PATCH v7 01/33] setup: call setup_git_directory_gently before accessing refs

2016-03-01 Thread David Turner
On Tue, 2016-03-01 at 18:47 -0500, David Turner wrote: > On Tue, 2016-03-01 at 03:35 -0500, Jeff King wrote: > > On Mon, Feb 29, 2016 at 07:52:34PM -0500, David Turner wrote: > > > > > Usually, git calls some form of setup_git_directory at startup. > > > But > > > sometimes, it doesn't. Usually

Re: [PATCH v7 01/33] setup: call setup_git_directory_gently before accessing refs

2016-03-01 Thread David Turner
On Tue, 2016-03-01 at 03:35 -0500, Jeff King wrote: > On Mon, Feb 29, 2016 at 07:52:34PM -0500, David Turner wrote: > > > Usually, git calls some form of setup_git_directory at startup. > > But > > sometimes, it doesn't. Usually, that's OK because it's not really > > using the repository. But

Re: [PATCH v7 01/33] setup: call setup_git_directory_gently before accessing refs

2016-03-01 Thread Jeff King
On Tue, Mar 01, 2016 at 04:53:30PM +0700, Duy Nguyen wrote: > > The basic strategy was to adapt the > > existing "struct startup_info" to be available everywhere, and have > > relevant bits of code assert() on it, or even behave differently (e.g., > > if some library code should do different thing

Re: [PATCH v7 01/33] setup: call setup_git_directory_gently before accessing refs

2016-03-01 Thread Duy Nguyen
On Tue, Mar 1, 2016 at 3:35 PM, Jeff King wrote: > On Mon, Feb 29, 2016 at 07:52:34PM -0500, David Turner wrote: > >> Usually, git calls some form of setup_git_directory at startup. But >> sometimes, it doesn't. Usually, that's OK because it's not really >> using the repository. But in some cas

Re: [PATCH v7 01/33] setup: call setup_git_directory_gently before accessing refs

2016-03-01 Thread Jeff King
On Mon, Feb 29, 2016 at 07:52:34PM -0500, David Turner wrote: > Usually, git calls some form of setup_git_directory at startup. But > sometimes, it doesn't. Usually, that's OK because it's not really > using the repository. But in some cases, it is using the repo. In > those cases, either setu