diff mbox series

[RFC,v1] t/README: the test repo does not have global or system configs

Message ID 20191016124515.1807-1-philipoakley@iee.email (mailing list archive)
State New, archived
Headers show
Series [RFC,v1] t/README: the test repo does not have global or system configs | expand

Commit Message

Philip Oakley Oct. 16, 2019, 12:45 p.m. UTC
Signed-off-by: Philip Oakley <philipoakley@iee.email>
---

While tring to get to grips with some Git-for-Windows config settings
for testing >4GiB files, I couldn't find any note in the readme about
the test system config file sources. 

Is this the right place for the information, is it complete enough,
and is the default config template special?

 t/README | 3 +++
 1 file changed, 3 insertions(+)

Comments

SZEDER Gábor Oct. 16, 2019, 4:47 p.m. UTC | #1
On Wed, Oct 16, 2019 at 01:45:15PM +0100, Philip Oakley wrote:
> Signed-off-by: Philip Oakley <philipoakley@iee.email>
> ---
> 
> While tring to get to grips with some Git-for-Windows config settings
> for testing >4GiB files, I couldn't find any note in the readme about
> the test system config file sources. 

The path of the system config file is determined at compile time, with
no way to override it at runtime.  Since we don't want external config
files influencing our tests, the only choice we have is to ignore the
system config file; that's why our test framework sets
GIT_CONFIG_NOSYSTEM=1.

> Is this the right place for the information, is it complete enough,
> and is the default config template special?
> 
>  t/README | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/t/README b/t/README
> index 60d5b77bcc..3daa1fa182 100644
> --- a/t/README
> +++ b/t/README
> @@ -485,6 +485,9 @@ This test harness library does the following things:
>     the --root option documented above, and a '.stress-<N>' suffix
>     appended by the --stress option.
>  
> + - The --global and --system config files are ignored, and
> +   a basic --local config is created in the tst repository.

s/tst/test/

However, note that the global config file isn't really ignored, but
different.  The path of the global config file depends on the values
of the env variables $XDG_CONFIG_HOME and $HOME, and, again, to avoid
external influences, our test framework unsets the former, and
overrides the latter with HOME="$TRASH_DIRECTORY".  IOW the global
config file in our tests is '.../t/trash directory.t1234-foo/.gitconfig'.

> +
>   - Defines standard test helper functions for your scripts to
>     use.  These functions are designed to make all scripts behave
>     consistently when command line arguments --verbose (or -v),
> -- 
> 2.23.0.windows.1.21.g947f504ebe8.dirty
>
Philip Oakley Oct. 16, 2019, 7:08 p.m. UTC | #2
On 16/10/2019 17:47, SZEDER Gábor wrote:
> On Wed, Oct 16, 2019 at 01:45:15PM +0100, Philip Oakley wrote:
>> Signed-off-by: Philip Oakley <philipoakley@iee.email>
>> ---
>>
>> While tring to get to grips with some Git-for-Windows config settings
>> for testing >4GiB files, I couldn't find any note in the readme about
>> the test system config file sources.
> The path of the system config file is determined at compile time, with
> no way to override it at runtime.  Since we don't want external config
> files influencing our tests, the only choice we have is to ignore the
> system config file; that's why our test framework sets
> GIT_CONFIG_NOSYSTEM=1.
Thanks.
>> Is this the right place for the information, is it complete enough,
>> and is the default config template special?
>>
>>   t/README | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/t/README b/t/README
>> index 60d5b77bcc..3daa1fa182 100644
>> --- a/t/README
>> +++ b/t/README
>> @@ -485,6 +485,9 @@ This test harness library does the following things:
>>      the --root option documented above, and a '.stress-<N>' suffix
>>      appended by the --stress option.
>>   
>> + - The --global and --system config files are ignored, and
>> +   a basic --local config is created in the tst repository.
> s/tst/test/
>
> However, note that the global config file isn't really ignored, but
> different.  The path of the global config file depends on the values
> of the env variables $XDG_CONFIG_HOME and $HOME, and, again, to avoid
> external influences, our test framework unsets the former, and
> overrides the latter with HOME="$TRASH_DIRECTORY".  IOW the global
> config file in our tests is '.../t/trash directory.t1234-foo/.gitconfig'.
Thanks
>> +
>>    - Defines standard test helper functions for your scripts to
>>      use.  These functions are designed to make all scripts behave
>>      consistently when command line arguments --verbose (or -v),
>> -- 
>> 2.23.0.windows.1.21.g947f504ebe8.dirty
>>
I'll revise the text with this clarifying information (rephrased to man 
page style)

Philip
diff mbox series

Patch

diff --git a/t/README b/t/README
index 60d5b77bcc..3daa1fa182 100644
--- a/t/README
+++ b/t/README
@@ -485,6 +485,9 @@  This test harness library does the following things:
    the --root option documented above, and a '.stress-<N>' suffix
    appended by the --stress option.
 
+ - The --global and --system config files are ignored, and
+   a basic --local config is created in the tst repository.
+
  - Defines standard test helper functions for your scripts to
    use.  These functions are designed to make all scripts behave
    consistently when command line arguments --verbose (or -v),