# [PATCH] config: fix commit-graph related config docs

5 messages from 2018-08-22 to 2018-08-23. Participants: Derrick Stolee, Duy Nguyen, Johannes Sixt, Junio C Hamano.
Thread: https://gitlist.dev/t/49190

## Derrick Stolee, 2018-08-22 13:16

Subject: [PATCH] config: fix commit-graph related config docs
Message-ID: <20180822131547.56899-1-dstolee@microsoft.com>
URL: https://gitlist.dev/e/20180822131547.56899-1-dstolee%40microsoft.com

```
The core.commitGraph config setting was accidentally removed from
the config documentation. In that same patch, the config setting
that writes a commit-graph during garbage collection was incorrectly
written to the doc as "gc.commitGraph" instead of "gc.writeCommitGraph".

Reported-by: Szeder Gábor <szeder.dev@gmail.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
---

Szeder reported this in [1] and I forgot until now to come back to it.

[1] https://public-inbox.org/git/20180803093909.2853-1-szeder.dev@gmail.com/

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

diff --git a/Documentation/config.txt b/Documentation/config.txt
index 1c42364988..f846543414 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -917,7 +917,11 @@ core.notesRef::
 This setting defaults to "refs/notes/commits", and it can be overridden by
 the `GIT_NOTES_REF` environment variable.  See linkgit:git-notes[1].
 
-gc.commitGraph::
+core.commitGraph::
+	Enable git commit graph feature. Allows reading from the
+	commit-graph file.
+
+gc.writeCommitGraph::
 	If true, then gc will rewrite the commit-graph file when
 	linkgit:git-gc[1] is run. When using linkgit:git-gc[1]
 	'--auto' the commit-graph will be updated if housekeeping is

base-commit: 7e8bfb0412581daf8f3c89909f1d37844e8610dd
-- 
2.19.0.rc0


```

## Duy Nguyen, 2018-08-22 15:25

Subject: Re: [PATCH] config: fix commit-graph related config docs
Message-ID: <CACsJy8C6DPTjhLm0tgyK4+RepQmWBkxnwTwoUhVvDYoXC_+m4w@mail.gmail.com>
URL: https://gitlist.dev/e/CACsJy8C6DPTjhLm0tgyK4%2BRepQmWBkxnwTwoUhVvDYoXC_%2Bm4w%40mail.gmail.com
In-Reply-To: <20180822131547.56899-1-dstolee@microsoft.com>

```
On Wed, Aug 22, 2018 at 3:18 PM Derrick Stolee <dstolee@microsoft.com> wrote:
>
> The core.commitGraph config setting was accidentally removed from
> the config documentation. In that same patch, the config setting
> that writes a commit-graph during garbage collection was incorrectly
> written to the doc as "gc.commitGraph" instead of "gc.writeCommitGraph".
>
> Reported-by: Szeder Gábor <szeder.dev@gmail.com>
> Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
> ---
>
> Szeder reported this in [1] and I forgot until now to come back to it.
>
> [1] https://public-inbox.org/git/20180803093909.2853-1-szeder.dev@gmail.com/
>
>  Documentation/config.txt | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index 1c42364988..f846543414 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -917,7 +917,11 @@ core.notesRef::
>  This setting defaults to "refs/notes/commits", and it can be overridden by
>  the `GIT_NOTES_REF` environment variable.  See linkgit:git-notes[1].
>
> -gc.commitGraph::
> +core.commitGraph::
> +       Enable git commit graph feature. Allows reading from the
> +       commit-graph file.
> +
> +gc.writeCommitGraph::

Do

git grep -i '^[a-z.]*::' Documentation/config.txt

and you will see that we (mostly) group config keys by section.
There's already gc group and this gc.writeCommitGraph belongs there,
not in the middle of "core" stuff.

>         If true, then gc will rewrite the commit-graph file when
>         linkgit:git-gc[1] is run. When using linkgit:git-gc[1]
>         '--auto' the commit-graph will be updated if housekeeping is
>
> base-commit: 7e8bfb0412581daf8f3c89909f1d37844e8610dd
> --
> 2.19.0.rc0
>


-- 
Duy

```

## Johannes Sixt, 2018-08-22 15:33

Subject: Re: [PATCH] config: fix commit-graph related config docs
Message-ID: <51671d59-8654-d79a-3fd9-9353aa4de1d7@kdbg.org>
URL: https://gitlist.dev/e/51671d59-8654-d79a-3fd9-9353aa4de1d7%40kdbg.org
In-Reply-To: <20180822131547.56899-1-dstolee@microsoft.com>

```
Am 22.08.2018 um 15:16 schrieb Derrick Stolee:
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index 1c42364988..f846543414 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -917,7 +917,11 @@ core.notesRef::
>   This setting defaults to "refs/notes/commits", and it can be overridden by
>   the `GIT_NOTES_REF` environment variable.  See linkgit:git-notes[1].
>   
> -gc.commitGraph::
> +core.commitGraph::
> +	Enable git commit graph feature. Allows reading from the
> +	commit-graph file.

Please do not assume that everybody knows what "the commit-graph file" 
is and that they know that they want it or do not want it. I do not 
know. You should mention here when to set this configuration variable to 
which values and what the default value is.

> +
> +gc.writeCommitGraph::
>   	If true, then gc will rewrite the commit-graph file when
>   	linkgit:git-gc[1] is run. When using linkgit:git-gc[1]
>   	'--auto' the commit-graph will be updated if housekeeping is

-- Hannes

```

## Derrick Stolee, 2018-08-23 15:51

Subject: [PATCH v2] config: fix commit-graph related config docs
Message-ID: <20180823155107.16658-1-dstolee@microsoft.com>
URL: https://gitlist.dev/e/20180823155107.16658-1-dstolee%40microsoft.com
In-Reply-To: <20180822131547.56899-1-dstolee@microsoft.com>

```
The core.commitGraph config setting was accidentally removed from
the config documentation. In that same patch, the config setting
that writes a commit-graph during garbage collection was incorrectly
written to the doc as "gc.commitGraph" instead of "gc.writeCommitGraph".

Reported-by: Szeder Gábor <szeder.dev@gmail.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
---
 Documentation/config.txt | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/Documentation/config.txt b/Documentation/config.txt
index 1c42364988..6ee1890984 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -917,12 +917,10 @@ core.notesRef::
 This setting defaults to "refs/notes/commits", and it can be overridden by
 the `GIT_NOTES_REF` environment variable.  See linkgit:git-notes[1].
 
-gc.commitGraph::
-	If true, then gc will rewrite the commit-graph file when
-	linkgit:git-gc[1] is run. When using linkgit:git-gc[1]
-	'--auto' the commit-graph will be updated if housekeeping is
-	required. Default is false. See linkgit:git-commit-graph[1]
-	for details.
+core.commitGraph::
+	If true, then git will read the commit-graph file (if it exists)
+	to parse the graph structure of commits. Defaults to false. See
+	linkgit:git-commit-graph[1] for more information.
 
 core.useReplaceRefs::
 	If set to `false`, behave as if the `--no-replace-objects`
@@ -1763,6 +1761,13 @@ this configuration variable is ignored, all packs except the base pack
 will be repacked. After this the number of packs should go below
 gc.autoPackLimit and gc.bigPackThreshold should be respected again.
 
+gc.writeCommitGraph::
+	If true, then gc will rewrite the commit-graph file when
+	linkgit:git-gc[1] is run. When using linkgit:git-gc[1]
+	'--auto' the commit-graph will be updated if housekeeping is
+	required. Default is false. See linkgit:git-commit-graph[1]
+	for details.
+
 gc.logExpiry::
 	If the file gc.log exists, then `git gc --auto` won't run
 	unless that file is more than 'gc.logExpiry' old.  Default is
-- 
2.19.0.rc0


```

## Junio C Hamano, 2018-08-23 17:20

Subject: Re: [PATCH v2] config: fix commit-graph related config docs
Message-ID: <xmqq1sapj8zd.fsf@gitster-ct.c.googlers.com>
URL: https://gitlist.dev/e/xmqq1sapj8zd.fsf%40gitster-ct.c.googlers.com
In-Reply-To: <20180823155107.16658-1-dstolee@microsoft.com>

```
Derrick Stolee <dstolee@microsoft.com> writes:

> The core.commitGraph config setting was accidentally removed from
> the config documentation. In that same patch, the config setting
> that writes a commit-graph during garbage collection was incorrectly
> written to the doc as "gc.commitGraph" instead of "gc.writeCommitGraph".
>
> Reported-by: Szeder Gábor <szeder.dev@gmail.com>
> Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
> ---
>  Documentation/config.txt | 17 +++++++++++------
>  1 file changed, 11 insertions(+), 6 deletions(-)

Thanks; that's an appropriate update before the release to tie the
final loose ends.  Will apply.

> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index 1c42364988..6ee1890984 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -917,12 +917,10 @@ core.notesRef::
>  This setting defaults to "refs/notes/commits", and it can be overridden by
>  the `GIT_NOTES_REF` environment variable.  See linkgit:git-notes[1].
>  
> -gc.commitGraph::
> -	If true, then gc will rewrite the commit-graph file when
> -	linkgit:git-gc[1] is run. When using linkgit:git-gc[1]
> -	'--auto' the commit-graph will be updated if housekeeping is
> -	required. Default is false. See linkgit:git-commit-graph[1]
> -	for details.
> +core.commitGraph::
> +	If true, then git will read the commit-graph file (if it exists)
> +	to parse the graph structure of commits. Defaults to false. See
> +	linkgit:git-commit-graph[1] for more information.
>  
>  core.useReplaceRefs::
>  	If set to `false`, behave as if the `--no-replace-objects`
> @@ -1763,6 +1761,13 @@ this configuration variable is ignored, all packs except the base pack
>  will be repacked. After this the number of packs should go below
>  gc.autoPackLimit and gc.bigPackThreshold should be respected again.
>  
> +gc.writeCommitGraph::
> +	If true, then gc will rewrite the commit-graph file when
> +	linkgit:git-gc[1] is run. When using linkgit:git-gc[1]
> +	'--auto' the commit-graph will be updated if housekeeping is
> +	required. Default is false. See linkgit:git-commit-graph[1]
> +	for details.
> +
>  gc.logExpiry::
>  	If the file gc.log exists, then `git gc --auto` won't run
>  	unless that file is more than 'gc.logExpiry' old.  Default is

```
