threads / patch / 49190

patchconfig: fix commit-graph related config docs

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

## tl;dr

5 messages between Aug 22, 2018 and Aug 23, 2018. Diffs are folded; open one to read it.

replies: 4people: 4as markdown or json

Derrick Stolee· Aug 22, 2018, 13:16 UTC · lore

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(-)
Show changes to Documentation/config.txt +5 −1
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· Aug 22, 2018, 15:25 UTC · re: Derrick Stolee · lore

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

On Wed, Aug 22, 2018 at 3:18 PM Derrick Stolee <dstolee@microsoft.com> wrote:
Show 31 quoted lines
>
> 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.

Show 8 quoted lines
>         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· Aug 22, 2018, 15:33 UTC · re: Derrick Stolee · lore

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

Am 22.08.2018 um 15:16 schrieb Derrick Stolee:
Show 12 quoted lines
> 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.

Show 5 quoted lines
> +
> +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· Aug 23, 2018, 15:51 UTC · re: Derrick Stolee · lore

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

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(-)
Show changes to Documentation/config.txt +11 −6
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· Aug 23, 2018, 17:20 UTC · re: Derrick Stolee · lore

Re: [PATCH v2] config: fix commit-graph related config docs

Derrick Stolee <dstolee@microsoft.com> writes:
Show 10 quoted lines
> 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.

Show 35 quoted lines
> 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

← back to recent threads