Re: [PATCH v3 0/9] Fix the early config

2017-03-10 Thread Junio C Hamano
Jeff King writes: >> > > Yes, exactly. It would have been less confusing if I picked something >> > > that passed nongit_ok. Like hash-object: >> >> ... or like testing the early config directly? > > I was trying to demonstrate that the problem existed already without > your patch series. Yup,

Re: [PATCH v3 0/9] Fix the early config

2017-03-09 Thread Jeff King
On Thu, Mar 09, 2017 at 12:51:06PM +0100, Johannes Schindelin wrote: > On Wed, 8 Mar 2017, Junio C Hamano wrote: > > > Jeff King writes: > > > > >> Or are you discussing a more general issue, iow, anything that can > > >> work without repository (i.e. those who do _gently version of the > > >>

Re: [PATCH v3 0/9] Fix the early config

2017-03-09 Thread Johannes Schindelin
Hi, On Wed, 8 Mar 2017, Junio C Hamano wrote: > Jeff King writes: > > >> Or are you discussing a more general issue, iow, anything that can > >> work without repository (i.e. those who do _gently version of the > >> setup and act on *nongit_ok) should pretend as if there were no > >> (broken) r

Re: [PATCH v3 0/9] Fix the early config

2017-03-08 Thread Junio C Hamano
Jeff King writes: >> Or are you discussing a more general issue, iow, anything that can >> work without repository (i.e. those who do _gently version of the >> setup and act on *nongit_ok) should pretend as if there were no >> (broken) repository and take the "no we are not in a repository" >> co

Re: [PATCH v3 0/9] Fix the early config

2017-03-08 Thread Jeff King
On Wed, Mar 08, 2017 at 05:18:46PM +0100, Johannes Schindelin wrote: > On Wed, 8 Mar 2017, Jeff King wrote: > > > Another "non-gentle" thing I noticed here while looking at > > another thread: the repository-format version check uses the config > > parser, which will die() in certain circumstance

Re: [PATCH v3 0/9] Fix the early config

2017-03-08 Thread Jeff King
On Wed, Mar 08, 2017 at 09:09:31AM -0800, Junio C Hamano wrote: > Jeff King writes: > > > Good catch. Another "non-gentle" thing I noticed here while looking at > > another thread: the repository-format version check uses the config > > parser, which will die() in certain circumstances. So for i

Re: [PATCH v3 0/9] Fix the early config

2017-03-08 Thread Junio C Hamano
Jeff King writes: > Good catch. Another "non-gentle" thing I noticed here while looking at > another thread: the repository-format version check uses the config > parser, which will die() in certain circumstances. So for instance: > > $ git init > $ git rev-parse && echo ok > ok > > $ ech

Re: [PATCH v3 0/9] Fix the early config

2017-03-08 Thread Johannes Schindelin
Hi Peff, On Wed, 8 Mar 2017, Jeff King wrote: > Another "non-gentle" thing I noticed here while looking at > another thread: the repository-format version check uses the config > parser, which will die() in certain circumstances. [...] Yes, that is part of the reason why I was not eager to add t

Re: [PATCH v3 0/9] Fix the early config

2017-03-08 Thread Jeff King
On Tue, Mar 07, 2017 at 03:31:43PM +0100, Johannes Schindelin wrote: > > /* > >* Find GIT_DIR of the repository that contains the current working > >* directory, without changing the working directory or other global > >* state. The result is appended to gitdir. The return value is N

Re: [PATCH v3 0/9] Fix the early config

2017-03-07 Thread Johannes Schindelin
Hi Junio, On Fri, 3 Mar 2017, Junio C Hamano wrote: > Johannes Schindelin writes: > > > Notable notes: > > > > - In contrast to earlier versions, I no longer special-case init and > > clone. Peff pointed out that this adds technical debt, and that we can > > actually argue (for consistency'

Re: [PATCH v3 0/9] Fix the early config

2017-03-07 Thread Johannes Schindelin
Hi Peff, On Sat, 4 Mar 2017, Jeff King wrote: > On Fri, Mar 03, 2017 at 06:31:55PM +0100, Johannes Schindelin wrote: > > > Interdiff vs v2: > > [...] > > + * When we are not about to create a repository ourselves (init or > > + * clone) and when no .git/ directory was set up yet (in which

Re: [PATCH v3 0/9] Fix the early config

2017-03-07 Thread Johannes Schindelin
Hi Junio, On Fri, 3 Mar 2017, Junio C Hamano wrote: > 2/9 and corresponding 4/9 triggers "ERROR: trailing statements > should be on next line" from ../linux/scripts/checkpatch.pl because > of a line inherited from the original; I'll queue them with an > obvious style fix to work it around. Wow,

Re: [PATCH v3 0/9] Fix the early config

2017-03-04 Thread Junio C Hamano
On Fri, Mar 3, 2017 at 11:39 PM, Jeff King wrote: >> + * When we are not about to create a repository ourselves (init or >> + * clone) and when no .git/ directory was set up yet (in which case >> + * git_config_with_options() would already have picked up the >> + * repository c

Re: [PATCH v3 0/9] Fix the early config

2017-03-03 Thread Jeff King
On Fri, Mar 03, 2017 at 06:31:55PM +0100, Johannes Schindelin wrote: > Interdiff vs v2: > [...] > + * When we are not about to create a repository ourselves (init or > + * clone) and when no .git/ directory was set up yet (in which case > + * git_config_with_options() would already

Re: [PATCH v3 0/9] Fix the early config

2017-03-03 Thread Junio C Hamano
Johannes Schindelin writes: > Notable notes: > > - In contrast to earlier versions, I no longer special-case init and > clone. Peff pointed out that this adds technical debt, and that we can > actually argue (for consistency's sake) that early config reads the > current repository config (i

[PATCH v3 0/9] Fix the early config

2017-03-03 Thread Johannes Schindelin
These patches are an attempt to make Git's startup sequence a bit less surprising. The idea here is to discover the .git/ directory gently (i.e. without changing the current working directory, or global variables), and to use it to read the .git/config file early, before we actually called setup_g