threads / patch / 43036

patchdocument git-repack interaction of pack.threads and pack.windowMemory

Subject: [PATCH] document git-repack interaction of pack.threads and pack.windowMemory

## tl;dr

3 messages between Aug 9, 2016 and Aug 10, 2016. Diffs are folded; open one to read it.

replies: 2people: 2as markdown or json

Michael Stahl· Aug 9, 2016, 11:53 UTC · lore
Signed-off-by: Michael Stahl <mstahl@redhat.com>
---
 Documentation/git-pack-objects.txt | 2 +-
 Documentation/git-repack.txt       | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)
Show changes to 2 files +6 −2

Documentation/git-pack-objects.txt, Documentation/git-repack.txt

diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt
index 19cdcd0..0b655a5 100644
--- a/Documentation/git-pack-objects.txt
+++ b/Documentation/git-pack-objects.txt
@@ -105,7 +105,7 @@ base-name::
 	advantage of the large window for the smaller objects.  The
 	size can be suffixed with "k", "m", or "g".
 	`--window-memory=0` makes memory usage unlimited, which is the
-	default.
+	default, unless the config variable `pack.windowMemory` is set.
 
 --max-pack-size=<n>::
 	Maximum size of each output pack file. The size can be suffixed with
diff --git a/Documentation/git-repack.txt b/Documentation/git-repack.txt
index c597523..300455b 100644
--- a/Documentation/git-repack.txt
+++ b/Documentation/git-repack.txt
@@ -101,7 +101,11 @@ other objects in that pack they already have locally.
 	advantage of the large window for the smaller objects.  The
 	size can be suffixed with "k", "m", or "g".
 	`--window-memory=0` makes memory usage unlimited, which is the
-	default.
+	default, unless the config variable `pack.windowMemory` is set.
+	Note that the actual memory usage will be multiplied
+	by the number of threads used by linkgit:git-pack-objects[1],
+	which is lacking a corresponding git-repack flag but can be
+	set via the config variable `pack.threads`.
 
 --max-pack-size=<n>::
 	Maximum size of each output pack file. The size can be suffixed with
-- 
2.7.4
Junio C Hamano· Aug 9, 2016, 18:27 UTC · re: Michael Stahl · lore

Re: [PATCH] document git-repack interaction of pack.threads and pack.windowMemory

Michael Stahl <mstahl@redhat.com> writes:
Show 16 quoted lines
> Signed-off-by: Michael Stahl <mstahl@redhat.com>
> ---
>  Documentation/git-pack-objects.txt | 2 +-
>  Documentation/git-repack.txt       | 6 +++++-
>  2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt
> index 19cdcd0..0b655a5 100644
> --- a/Documentation/git-pack-objects.txt
> +++ b/Documentation/git-pack-objects.txt
> @@ -105,7 +105,7 @@ base-name::
>  	advantage of the large window for the smaller objects.  The
>  	size can be suffixed with "k", "m", or "g".
>  	`--window-memory=0` makes memory usage unlimited, which is the
> -	default.
> +	default, unless the config variable `pack.windowMemory` is set.

That does not go far enough as it does not say what happens when the variable is set (i.e. "the variable serves as the default in that case").

Perhaps "...makes memory usage unlimited. The default is taken from the `pack.windowMemory` configuration variable." would make it better, as it is described that its default is "unlimited".

Show 14 quoted lines
> diff --git a/Documentation/git-repack.txt b/Documentation/git-repack.txt
> index c597523..300455b 100644
> --- a/Documentation/git-repack.txt
> +++ b/Documentation/git-repack.txt
> @@ -101,7 +101,11 @@ other objects in that pack they already have locally.
>  	advantage of the large window for the smaller objects.  The
>  	size can be suffixed with "k", "m", or "g".
>  	`--window-memory=0` makes memory usage unlimited, which is the
> -	default.
> +	default, unless the config variable `pack.windowMemory` is set.
> +	Note that the actual memory usage will be multiplied
> +	by the number of threads used by linkgit:git-pack-objects[1],
> +	which is lacking a corresponding git-repack flag but can be
> +	set via the config variable `pack.threads`.

I think the same comment applies to the first line. The next two lines are definite improvement, but I do not think the last two lines are necessary.

Michael Stahl· Aug 10, 2016, 10:39 UTC · re: Junio C Hamano · lore

Re: [PATCH] document git-repack interaction of pack.threads and pack.windowMemory

Signed-off-by: Michael Stahl <mstahl@redhat.com>
---
 Documentation/git-pack-objects.txt | 4 ++--
 Documentation/git-repack.txt       | 6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)
Show changes to 2 files +6 −4

Documentation/git-pack-objects.txt, Documentation/git-repack.txt

diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt
index 19cdcd0..8973510 100644
--- a/Documentation/git-pack-objects.txt
+++ b/Documentation/git-pack-objects.txt
@@ -104,8 +104,8 @@ base-name::
 	out of memory with a large window, but still be able to take
 	advantage of the large window for the smaller objects.  The
 	size can be suffixed with "k", "m", or "g".
-	`--window-memory=0` makes memory usage unlimited, which is the
-	default.
+	`--window-memory=0` makes memory usage unlimited.  The default
+	is taken from the `pack.windowMemory` configuration variable.
 
 --max-pack-size=<n>::
 	Maximum size of each output pack file. The size can be suffixed with
diff --git a/Documentation/git-repack.txt b/Documentation/git-repack.txt
index c597523..26afe6e 100644
--- a/Documentation/git-repack.txt
+++ b/Documentation/git-repack.txt
@@ -100,8 +100,10 @@ other objects in that pack they already have locally.
 	out of memory with a large window, but still be able to take
 	advantage of the large window for the smaller objects.  The
 	size can be suffixed with "k", "m", or "g".
-	`--window-memory=0` makes memory usage unlimited, which is the
-	default.
+	`--window-memory=0` makes memory usage unlimited.  The default
+	is taken from the `pack.windowMemory` configuration variable.
+	Note that the actual memory usage will be the limit multiplied
+	by the number of threads used by linkgit:git-pack-objects[1].
 
 --max-pack-size=<n>::
 	Maximum size of each output pack file. The size can be suffixed with
-- 
2.7.4

← back to recent threads