git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Bug report: GIT_CONFIG and user.email/name
@ 2021-07-14 17:10 German Lashevich
  2021-07-14 18:10 ` Jeff King
  0 siblings, 1 reply; 16+ messages in thread
From: German Lashevich @ 2021-07-14 17:10 UTC (permalink / raw)
  To: git@vger.kernel.org

Hello,

I've faced an issue while trying to use a non-default .gitconfig file
via specifying
GIT_CONFIG environment variable.


What did you do before the bug happened? (Steps to reproduce your issue)

```
# use custom .gitconfig via GIT_CONFIG envvar:
mkdir -p /tmp/git-test/repo
cat <<EOT > /tmp/git-test/.gitconfig
[user]
    name = John Doe
    email = john@doe.me
EOT
cd /tmp/git-test/repo
git init
export GIT_CONFIG=/tmp/git-test/.gitconfig
echo Hi > readme.txt
git add readme.txt
git commit -m 'Initial commit'
```


What did you expect to happen? (Expected behavior)
Git creates a new commit.


What happened instead? (Actual behavior)
Error occurred:

```
Author identity unknown

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'john@computer.(none)')
```


What's different between what you expected and what actually happened?
For some reason `git commit` doesn't use configuration options specified
in the
custom `.gitconfig` file.


Anything else you want to add:
`git config` shows correct values:

```
sh-5.1$ pwd
/tmp/git-test/repo
sh-5.1$ echo $GIT_CONFIG
/tmp/git-test/.gitconfig
sh-5.1$ cat $GIT_CONFIG
[user]
    name = John Doe
    email = john@doe.me
sh-5.1$ git config user.name
John Doe
sh-5.1$ git config user.email
john@doe.me
```

The same happens with git version 2.32.0.432.gabb21c7263


[System Info]
git version:
git version 2.32.0
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 5.12.15-arch1-1 #1 SMP PREEMPT Wed, 07 Jul 2021 23:35:29
+0000 x86_64
compiler info: gnuc: 11.1
libc info: glibc: 2.33
$SHELL (typically, interactive shell): /bin/zsh

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Bug report: GIT_CONFIG and user.email/name
  2021-07-14 17:10 Bug report: GIT_CONFIG and user.email/name German Lashevich
@ 2021-07-14 18:10 ` Jeff King
  2021-07-14 18:26   ` German Lashevich
  2021-07-14 20:47   ` Junio C Hamano
  0 siblings, 2 replies; 16+ messages in thread
From: Jeff King @ 2021-07-14 18:10 UTC (permalink / raw)
  To: German Lashevich; +Cc: git@vger.kernel.org

On Wed, Jul 14, 2021 at 07:10:27PM +0200, German Lashevich wrote:

> I've faced an issue while trying to use a non-default .gitconfig file
> via specifying
> GIT_CONFIG environment variable.
> 
> What did you do before the bug happened? (Steps to reproduce your issue)
> 
> ```
> # use custom .gitconfig via GIT_CONFIG envvar:
> mkdir -p /tmp/git-test/repo
> cat <<EOT > /tmp/git-test/.gitconfig
> [user]
>     name = John Doe
>     email = john@doe.me
> EOT
> cd /tmp/git-test/repo
> git init
> export GIT_CONFIG=/tmp/git-test/.gitconfig
> echo Hi > readme.txt
> git add readme.txt
> git commit -m 'Initial commit'
> ```

The GIT_CONFIG variable doesn't work that way. It is not a general
mechanism used by all of Git, but rather a specific feature of the
git-config program (and even there it is a historical wart; you should
use "git config --file" instead).

One of these variables is probably more helpful:

  $ man git | sed -n '/GLOBAL/,/^$/p'
  GIT_CONFIG_GLOBAL, GIT_CONFIG_SYSTEM
    Take the configuration from the given files instead from global or
    system-level configuration files. If GIT_CONFIG_SYSTEM is set, the
    system config file defined at build time (usually /etc/gitconfig)
    will not be read. Likewise, if GIT_CONFIG_GLOBAL is set, neither
    $HOME/.gitconfig nor $XDG_CONFIG_HOME/git/config will be read. Can
    be set to /dev/null to skip reading configuration files of the
    respective level.

Note that they're new in v2.32.0.

-Peff

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Bug report: GIT_CONFIG and user.email/name
  2021-07-14 18:10 ` Jeff King
@ 2021-07-14 18:26   ` German Lashevich
  2021-07-14 20:47   ` Junio C Hamano
  1 sibling, 0 replies; 16+ messages in thread
From: German Lashevich @ 2021-07-14 18:26 UTC (permalink / raw)
  To: Jeff King; +Cc: git@vger.kernel.org

GIT_CONFIG is confusing, GIT_CONFIG_GLOBAL is what I need.

Thanks a lot! 

On Jul 14 2021, at 8:10 pm, Jeff King <peff@peff.net> wrote:

> On Wed, Jul 14, 2021 at 07:10:27PM +0200, German Lashevich wrote:
> 
>> I've faced an issue while trying to use a non-default .gitconfig file
>> via specifying
>> GIT_CONFIG environment variable.
>> 
>> What did you do before the bug happened? (Steps to reproduce your issue)
>> 
>> ```
>> # use custom .gitconfig via GIT_CONFIG envvar:
>> mkdir -p /tmp/git-test/repo
>> cat <<EOT > /tmp/git-test/.gitconfig
>> [user]
>>     name = John Doe
>>     email = john@doe.me
>> EOT
>> cd /tmp/git-test/repo
>> git init
>> export GIT_CONFIG=/tmp/git-test/.gitconfig
>> echo Hi > readme.txt
>> git add readme.txt
>> git commit -m 'Initial commit'
>> ```
> 
> The GIT_CONFIG variable doesn't work that way. It is not a general
> mechanism used by all of Git, but rather a specific feature of the
> git-config program (and even there it is a historical wart; you should
> use "git config --file" instead).
> 
> One of these variables is probably more helpful:
> 
>  $ man git | sed -n '/GLOBAL/,/^$/p'
>  GIT_CONFIG_GLOBAL, GIT_CONFIG_SYSTEM
>    Take the configuration from the given files instead from global or
>    system-level configuration files. If GIT_CONFIG_SYSTEM is set, the
>    system config file defined at build time (usually /etc/gitconfig)
>    will not be read. Likewise, if GIT_CONFIG_GLOBAL is set, neither
>    $HOME/.gitconfig nor $XDG_CONFIG_HOME/git/config will be read. Can
>    be set to /dev/null to skip reading configuration files of the
>    respective level.
> 
> Note that they're new in v2.32.0.
> 
> -Peff
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Bug report: GIT_CONFIG and user.email/name
  2021-07-14 18:10 ` Jeff King
  2021-07-14 18:26   ` German Lashevich
@ 2021-07-14 20:47   ` Junio C Hamano
  2021-07-14 21:36     ` Jeff King
  1 sibling, 1 reply; 16+ messages in thread
From: Junio C Hamano @ 2021-07-14 20:47 UTC (permalink / raw)
  To: Jeff King; +Cc: German Lashevich, git@vger.kernel.org

Jeff King <peff@peff.net> writes:

> The GIT_CONFIG variable doesn't work that way. It is not a general
> mechanism used by all of Git, but rather a specific feature of the
> git-config program (and even there it is a historical wart; you should
> use "git config --file" instead).

We both have known that, but a fresh re-read of GIT_CONFIG in "git
help config" gave me a misleading impression.

    ENVIRONMENT
    -----------

    GIT_CONFIG::
            Take the configuration from the given file instead of .git/config.
            Using the "--global" option forces this to ~/.gitconfig. Using the
            "--system" option forces this to $(prefix)/etc/gitconfig.

is what we have above the GLOBAL and SYSTEM you quoted below.  We
should say GIT_CONFIG is only for "git config" command while the
other two affects everybody, right?

Thanks.

> One of these variables is probably more helpful:
>
>   $ man git | sed -n '/GLOBAL/,/^$/p'
>   GIT_CONFIG_GLOBAL, GIT_CONFIG_SYSTEM
>     Take the configuration from the given files instead from global or
>     system-level configuration files. If GIT_CONFIG_SYSTEM is set, the
>     system config file defined at build time (usually /etc/gitconfig)
>     will not be read. Likewise, if GIT_CONFIG_GLOBAL is set, neither
>     $HOME/.gitconfig nor $XDG_CONFIG_HOME/git/config will be read. Can
>     be set to /dev/null to skip reading configuration files of the
>     respective level.
>
> Note that they're new in v2.32.0.
>
> -Peff

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Bug report: GIT_CONFIG and user.email/name
  2021-07-14 20:47   ` Junio C Hamano
@ 2021-07-14 21:36     ` Jeff King
  2021-07-14 21:37       ` [PATCH 1/3] doc/git-config: explain --file instead of referring to GIT_CONFIG Jeff King
                         ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Jeff King @ 2021-07-14 21:36 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: German Lashevich, git@vger.kernel.org

On Wed, Jul 14, 2021 at 01:47:55PM -0700, Junio C Hamano wrote:

> Jeff King <peff@peff.net> writes:
> 
> > The GIT_CONFIG variable doesn't work that way. It is not a general
> > mechanism used by all of Git, but rather a specific feature of the
> > git-config program (and even there it is a historical wart; you should
> > use "git config --file" instead).
> 
> We both have known that, but a fresh re-read of GIT_CONFIG in "git
> help config" gave me a misleading impression.
> 
>     ENVIRONMENT
>     -----------
> 
>     GIT_CONFIG::
>             Take the configuration from the given file instead of .git/config.
>             Using the "--global" option forces this to ~/.gitconfig. Using the
>             "--system" option forces this to $(prefix)/etc/gitconfig.
> 
> is what we have above the GLOBAL and SYSTEM you quoted below.  We
> should say GIT_CONFIG is only for "git config" command while the
> other two affects everybody, right?

Yes, it looks like that description is from 2007 (when GIT_CONFIG really
did impact other commands). And adding GIT_CONFIG_GLOBAL and SYSTEM
nearby certainly didn't help (before then, I might have argued that
since GIT_CONFIG is only in git-config(1), it is more clear that it only
applies there).

Here's a short series to improve things.

  [1/3]: doc/git-config: explain --file instead of referring to GIT_CONFIG
  [2/3]: doc/git-config: clarify GIT_CONFIG environment variable
  [3/3]: doc/git-config: simplify "override" advice for FILES section

 Documentation/git-config.txt | 28 +++++++++++++++++-----------
 1 file changed, 17 insertions(+), 11 deletions(-)

-Peff

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/3] doc/git-config: explain --file instead of referring to GIT_CONFIG
  2021-07-14 21:36     ` Jeff King
@ 2021-07-14 21:37       ` Jeff King
  2021-07-14 22:20         ` Taylor Blau
  2021-07-20 19:34         ` Martin Ågren
  2021-07-14 21:38       ` [PATCH 2/3] doc/git-config: clarify GIT_CONFIG environment variable Jeff King
                         ` (2 subsequent siblings)
  3 siblings, 2 replies; 16+ messages in thread
From: Jeff King @ 2021-07-14 21:37 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: German Lashevich, git@vger.kernel.org

The explanation for the --file option only refers to GIT_CONFIG. This
redirection to an environment variable is confusing, but doubly so
because the description of GIT_CONFIG is out of date.

Let's describe --file from scratch, detailing both the reading and
writing behavior as we do for other similar options like --system, etc.

Signed-off-by: Jeff King <peff@peff.net>
---
The formatting is a bit clunky to read in the source, but I think it
looks OK in the rendered version. At any rate, it's all taken from the
other options, so if we want to improve it, it would make sense to do so
separately on top.

 Documentation/git-config.txt | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
index 5cddadafd2..193fef2867 100644
--- a/Documentation/git-config.txt
+++ b/Documentation/git-config.txt
@@ -143,7 +143,13 @@ See also <<FILES>>.
 
 -f config-file::
 --file config-file::
-	Use the given config file instead of the one specified by GIT_CONFIG.
+	For writing options: write to the specified file rather than the
+	repository `.git/config`.
++
+For reading options: read only from the specified file rather than from all
+avialable files.
++
+See also <<FILES>>.
 
 --blob blob::
 	Similar to `--file` but use the given blob instead of a file. E.g.
-- 
2.32.0.689.gbb74d99cdd


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 2/3] doc/git-config: clarify GIT_CONFIG environment variable
  2021-07-14 21:36     ` Jeff King
  2021-07-14 21:37       ` [PATCH 1/3] doc/git-config: explain --file instead of referring to GIT_CONFIG Jeff King
@ 2021-07-14 21:38       ` Jeff King
  2021-07-14 21:38       ` [PATCH 3/3] doc/git-config: simplify "override" advice for FILES section Jeff King
  2021-07-14 22:22       ` Bug report: GIT_CONFIG and user.email/name Taylor Blau
  3 siblings, 0 replies; 16+ messages in thread
From: Jeff King @ 2021-07-14 21:38 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: German Lashevich, git@vger.kernel.org

The scope and utility of the GIT_CONFIG variable was drastically reduced
by dc87183189 (Only use GIT_CONFIG in "git config", not other programs,
2008-06-30). But the documentation in git-config(1) predates that, which
makes it rather misleading.

These days it is really just another way to say "--file". So let's say
that, and explicitly make it clear that it does not impact other Git
commands (like GIT_CONFIG_SYSTEM, etc, would).

I also bumped it to the bottom of the list of variables, and warned
people off of using it. We don't have any plans for deprecation at this
point, but there's little point in encouraging people to use it by
putting it at the top of the list.

Signed-off-by: Jeff King <peff@peff.net>
---
I'm taking a more opinionated stance on "nobody should actually use this
thing", but I think it's merited. It really is useless, and if not for
the history, I'd argue against somebody trying to introduce such a thing
now. :)

 Documentation/git-config.txt | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
index 193fef2867..30186812a8 100644
--- a/Documentation/git-config.txt
+++ b/Documentation/git-config.txt
@@ -341,11 +341,6 @@ can specify any filename you want.
 ENVIRONMENT
 -----------
 
-GIT_CONFIG::
-	Take the configuration from the given file instead of .git/config.
-	Using the "--global" option forces this to ~/.gitconfig. Using the
-	"--system" option forces this to $(prefix)/etc/gitconfig.
-
 GIT_CONFIG_GLOBAL::
 GIT_CONFIG_SYSTEM::
 	Take the configuration from the given files instead from global or
@@ -373,6 +368,12 @@ This is useful for cases where you want to spawn multiple git commands
 with a common configuration but cannot depend on a configuration file,
 for example when writing scripts.
 
+GIT_CONFIG::
+	If no `--file` option is provided to `git config`, use the file
+	given by `GIT_CONFIG` as if it were provided via `--file`. This
+	variable has no effect on other Git commands, and is mostly for
+	historical compatibility; there is generally no reason to use it
+	instead of the `--file` option.
 
 [[EXAMPLES]]
 EXAMPLES
-- 
2.32.0.689.gbb74d99cdd


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 3/3] doc/git-config: simplify "override" advice for FILES section
  2021-07-14 21:36     ` Jeff King
  2021-07-14 21:37       ` [PATCH 1/3] doc/git-config: explain --file instead of referring to GIT_CONFIG Jeff King
  2021-07-14 21:38       ` [PATCH 2/3] doc/git-config: clarify GIT_CONFIG environment variable Jeff King
@ 2021-07-14 21:38       ` Jeff King
  2021-07-14 22:22       ` Bug report: GIT_CONFIG and user.email/name Taylor Blau
  3 siblings, 0 replies; 16+ messages in thread
From: Jeff King @ 2021-07-14 21:38 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: German Lashevich, git@vger.kernel.org

At the end of the FILES section, we indicate that you can override the
regular lookup rules with --global, etc. But:

  - we're missing the --local option

  - we point to GIT_CONFIG instead of --file, but the latter has much
    better documentation

  - we're vague about how the overrides work; the actual option
    descriptions are much better here

So let's just mention the names and point people back to the OPTIONS
section. We could perhaps even delete this paragraph entirely, but the
presence of the names may give people reading FILES a clue about where
to look for more information.

Signed-off-by: Jeff King <peff@peff.net>
---
 Documentation/git-config.txt | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
index 30186812a8..e30edf99c6 100644
--- a/Documentation/git-config.txt
+++ b/Documentation/git-config.txt
@@ -71,6 +71,7 @@ codes are:
 
 On success, the command returns the exit code 0.
 
+[[OPTIONS]]
 OPTIONS
 -------
 
@@ -331,11 +332,9 @@ All writing options will per default write to the repository specific
 configuration file. Note that this also affects options like `--replace-all`
 and `--unset`. *'git config' will only ever change one file at a time*.
 
-You can override these rules either by command-line options or by environment
-variables. The `--global`, `--system` and `--worktree` options will limit
-the file used to the global, system-wide or per-worktree file respectively.
-The `GIT_CONFIG` environment variable has a similar effect, but you
-can specify any filename you want.
+You can override these rules using the `--global`, `--system`,
+`--local`, `--worktree`, and `--file` command-line options; see
+<<OPTIONS>> above.
 
 
 ENVIRONMENT
-- 
2.32.0.689.gbb74d99cdd

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/3] doc/git-config: explain --file instead of referring to GIT_CONFIG
  2021-07-14 21:37       ` [PATCH 1/3] doc/git-config: explain --file instead of referring to GIT_CONFIG Jeff King
@ 2021-07-14 22:20         ` Taylor Blau
  2021-07-14 22:23           ` Jeff King
  2021-07-20 19:34         ` Martin Ågren
  1 sibling, 1 reply; 16+ messages in thread
From: Taylor Blau @ 2021-07-14 22:20 UTC (permalink / raw)
  To: Jeff King; +Cc: Junio C Hamano, German Lashevich, git@vger.kernel.org

On Wed, Jul 14, 2021 at 05:37:29PM -0400, Jeff King wrote:
>  -f config-file::
>  --file config-file::
> -	Use the given config file instead of the one specified by GIT_CONFIG.
> +	For writing options: write to the specified file rather than the
> +	repository `.git/config`.

I wonder whether or not we should write "rather than the repository
`$GIT_DIR/config`" instead of `.git/config`. The former is true for bare
repositories, too, but may in fact be more confusing than what you have
writen so clearly.

Perhaps `.git/config` is clear enough; I definitely don't feel strongly
about it.

Thanks,
Taylor

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Bug report: GIT_CONFIG and user.email/name
  2021-07-14 21:36     ` Jeff King
                         ` (2 preceding siblings ...)
  2021-07-14 21:38       ` [PATCH 3/3] doc/git-config: simplify "override" advice for FILES section Jeff King
@ 2021-07-14 22:22       ` Taylor Blau
  3 siblings, 0 replies; 16+ messages in thread
From: Taylor Blau @ 2021-07-14 22:22 UTC (permalink / raw)
  To: Jeff King; +Cc: Junio C Hamano, German Lashevich, git@vger.kernel.org

On Wed, Jul 14, 2021 at 05:36:09PM -0400, Jeff King wrote:
> Here's a short series to improve things.
>
>   [1/3]: doc/git-config: explain --file instead of referring to GIT_CONFIG
>   [2/3]: doc/git-config: clarify GIT_CONFIG environment variable
>   [3/3]: doc/git-config: simplify "override" advice for FILES section
>
>  Documentation/git-config.txt | 28 +++++++++++++++++-----------
>  1 file changed, 17 insertions(+), 11 deletions(-)

Looks very good to me. I left a small note on the first patch, but you
should feel free to ignore it, since I'm not sure whether my suggestion
is an improvement or not ;).

    Reviewed-by: Taylor Blau <me@ttaylorr.com>

Thanks,
Taylor

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/3] doc/git-config: explain --file instead of referring to GIT_CONFIG
  2021-07-14 22:20         ` Taylor Blau
@ 2021-07-14 22:23           ` Jeff King
  2021-07-14 22:26             ` Taylor Blau
  0 siblings, 1 reply; 16+ messages in thread
From: Jeff King @ 2021-07-14 22:23 UTC (permalink / raw)
  To: Taylor Blau; +Cc: Junio C Hamano, German Lashevich, git@vger.kernel.org

On Wed, Jul 14, 2021 at 06:20:30PM -0400, Taylor Blau wrote:

> On Wed, Jul 14, 2021 at 05:37:29PM -0400, Jeff King wrote:
> >  -f config-file::
> >  --file config-file::
> > -	Use the given config file instead of the one specified by GIT_CONFIG.
> > +	For writing options: write to the specified file rather than the
> > +	repository `.git/config`.
> 
> I wonder whether or not we should write "rather than the repository
> `$GIT_DIR/config`" instead of `.git/config`. The former is true for bare
> repositories, too, but may in fact be more confusing than what you have
> writen so clearly.
> 
> Perhaps `.git/config` is clear enough; I definitely don't feel strongly
> about it.

Yes, I noticed that, too. This is copied verbatim from the other
options, so if we were to do that, it should be done on top across the
whole file.

-Peff

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/3] doc/git-config: explain --file instead of referring to GIT_CONFIG
  2021-07-14 22:23           ` Jeff King
@ 2021-07-14 22:26             ` Taylor Blau
  0 siblings, 0 replies; 16+ messages in thread
From: Taylor Blau @ 2021-07-14 22:26 UTC (permalink / raw)
  To: Jeff King
  Cc: Taylor Blau, Junio C Hamano, German Lashevich,
	git@vger.kernel.org

On Wed, Jul 14, 2021 at 06:23:38PM -0400, Jeff King wrote:
> On Wed, Jul 14, 2021 at 06:20:30PM -0400, Taylor Blau wrote:
> > Perhaps `.git/config` is clear enough; I definitely don't feel strongly
> > about it.
>
> Yes, I noticed that, too. This is copied verbatim from the other
> options, so if we were to do that, it should be done on top across the
> whole file.

I'm dubious that s,.git/config,$GIT_DIR/config,g would be an improvement
in clarity if done across the whole file, and I'd rather be consistent
than not. So I think that it's fine as is.

Thanks,
Taylor

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/3] doc/git-config: explain --file instead of referring to GIT_CONFIG
  2021-07-14 21:37       ` [PATCH 1/3] doc/git-config: explain --file instead of referring to GIT_CONFIG Jeff King
  2021-07-14 22:20         ` Taylor Blau
@ 2021-07-20 19:34         ` Martin Ågren
  2021-07-20 20:01           ` Jeff King
  1 sibling, 1 reply; 16+ messages in thread
From: Martin Ågren @ 2021-07-20 19:34 UTC (permalink / raw)
  To: Jeff King; +Cc: Junio C Hamano, German Lashevich, git@vger.kernel.org

On Thu, 15 Jul 2021 at 00:25, Jeff King <peff@peff.net> wrote:
> -       Use the given config file instead of the one specified by GIT_CONFIG.
> +       For writing options: write to the specified file rather than the
> +       repository `.git/config`.
> ++
> +For reading options: read only from the specified file rather than from all
> +avialable files.

s/avialable/available/

Martin

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/3] doc/git-config: explain --file instead of referring to GIT_CONFIG
  2021-07-20 19:34         ` Martin Ågren
@ 2021-07-20 20:01           ` Jeff King
  2021-07-20 20:03             ` Jeff King
  2021-07-20 21:55             ` Junio C Hamano
  0 siblings, 2 replies; 16+ messages in thread
From: Jeff King @ 2021-07-20 20:01 UTC (permalink / raw)
  To: Martin Ågren; +Cc: Junio C Hamano, German Lashevich, git@vger.kernel.org

On Tue, Jul 20, 2021 at 09:34:43PM +0200, Martin Ågren wrote:

> On Thu, 15 Jul 2021 at 00:25, Jeff King <peff@peff.net> wrote:
> > -       Use the given config file instead of the one specified by GIT_CONFIG.
> > +       For writing options: write to the specified file rather than the
> > +       repository `.git/config`.
> > ++
> > +For reading options: read only from the specified file rather than from all
> > +avialable files.
> 
> s/avialable/available/

Thanks. You'd think that I would have gotten the part cut-and-paste from
earlier right. :)

I double-checked the rest of the series for other spelling errors but
didn't see any. This is marked for merging to next, but hasn't made it
yet. So if you get this in time, Junio, can you please squash this into
the first patch?

diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
index 193fef2867..6c78ad1c13 100644
--- a/Documentation/git-config.txt
+++ b/Documentation/git-config.txt
@@ -147,7 +147,7 @@ See also <<FILES>>.
 	repository `.git/config`.
 +
 For reading options: read only from the specified file rather than from all
-avialable files.
+available files.
 +
 See also <<FILES>>.
 

-Peff

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/3] doc/git-config: explain --file instead of referring to GIT_CONFIG
  2021-07-20 20:01           ` Jeff King
@ 2021-07-20 20:03             ` Jeff King
  2021-07-20 21:55             ` Junio C Hamano
  1 sibling, 0 replies; 16+ messages in thread
From: Jeff King @ 2021-07-20 20:03 UTC (permalink / raw)
  To: Martin Ågren; +Cc: Junio C Hamano, German Lashevich, git@vger.kernel.org

On Tue, Jul 20, 2021 at 04:01:55PM -0400, Jeff King wrote:

> I double-checked the rest of the series for other spelling errors but
> didn't see any. This is marked for merging to next, but hasn't made it
> yet. So if you get this in time, Junio, can you please squash this into
> the first patch?

I should say: the first patch of jk/config-env-doc to hopefully make it
easier. :)

-Peff

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/3] doc/git-config: explain --file instead of referring to GIT_CONFIG
  2021-07-20 20:01           ` Jeff King
  2021-07-20 20:03             ` Jeff King
@ 2021-07-20 21:55             ` Junio C Hamano
  1 sibling, 0 replies; 16+ messages in thread
From: Junio C Hamano @ 2021-07-20 21:55 UTC (permalink / raw)
  To: Jeff King; +Cc: Martin Ågren, German Lashevich, git@vger.kernel.org

Jeff King <peff@peff.net> writes:

> I double-checked the rest of the series for other spelling errors but
> didn't see any. This is marked for merging to next, but hasn't made it
> yet. So if you get this in time, Junio, can you please squash this into
> the first patch?

Thanks, will do.


>
> diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
> index 193fef2867..6c78ad1c13 100644
> --- a/Documentation/git-config.txt
> +++ b/Documentation/git-config.txt
> @@ -147,7 +147,7 @@ See also <<FILES>>.
>  	repository `.git/config`.
>  +
>  For reading options: read only from the specified file rather than from all
> -avialable files.
> +available files.
>  +
>  See also <<FILES>>.
>  
>
> -Peff

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-07-20 21:56 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-14 17:10 Bug report: GIT_CONFIG and user.email/name German Lashevich
2021-07-14 18:10 ` Jeff King
2021-07-14 18:26   ` German Lashevich
2021-07-14 20:47   ` Junio C Hamano
2021-07-14 21:36     ` Jeff King
2021-07-14 21:37       ` [PATCH 1/3] doc/git-config: explain --file instead of referring to GIT_CONFIG Jeff King
2021-07-14 22:20         ` Taylor Blau
2021-07-14 22:23           ` Jeff King
2021-07-14 22:26             ` Taylor Blau
2021-07-20 19:34         ` Martin Ågren
2021-07-20 20:01           ` Jeff King
2021-07-20 20:03             ` Jeff King
2021-07-20 21:55             ` Junio C Hamano
2021-07-14 21:38       ` [PATCH 2/3] doc/git-config: clarify GIT_CONFIG environment variable Jeff King
2021-07-14 21:38       ` [PATCH 3/3] doc/git-config: simplify "override" advice for FILES section Jeff King
2021-07-14 22:22       ` Bug report: GIT_CONFIG and user.email/name Taylor Blau

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).