# [PATCH] git-repack(1): document --window and --depth

2 messages from 2006-09-17 to 2006-09-17. Participants: Jonas Fonseca, Junio C Hamano.
Thread: https://gitlist.dev/t/5588

## Jonas Fonseca, 2006-09-17 11:02

Subject: [PATCH] git-repack(1): document --window and --depth
Message-ID: <20060917110259.GB1497@diku.dk>
URL: https://gitlist.dev/e/20060917110259.GB1497%40diku.dk

```
Copy and pasted from git-pack-objects(1).

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---
 Documentation/git-repack.txt |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/Documentation/git-repack.txt b/Documentation/git-repack.txt
index 9516227..49f7e0a 100644
--- a/Documentation/git-repack.txt
+++ b/Documentation/git-repack.txt
@@ -9,7 +9,7 @@ objects into pack files.
 
 SYNOPSIS
 --------
-'git-repack' [-a] [-d] [-f] [-l] [-n] [-q]
+'git-repack' [-a] [-d] [-f] [-l] [-n] [-q] [--window=N] [--depth=N]
 
 DESCRIPTION
 -----------
@@ -56,6 +56,16 @@ OPTIONS
         Do not update the server information with
         `git update-server-info`.
 
+--window=[N], --depth=[N]::
+	These two options affects how the objects contained in the pack are
+	stored using delta compression. The objects are first internally
+	sorted by type, size and optionally names and compared against the
+	other objects within `--window` to see if using delta compression saves
+	space. `--depth` limits the maximum delta depth; making it too deep
+	affects the performance on the unpacker side, because delta data needs
+	to be applied that many times to get to the necessary object.
+
+
 Author
 ------
 Written by Linus Torvalds <torvalds@osdl.org>
-- 
1.4.2.g39f1

-- 
Jonas Fonseca

```

## Junio C Hamano, 2006-09-17 21:18

Subject: Re: [PATCH] git-repack(1): document --window and --depth
Message-ID: <7vpsdu2nvw.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vpsdu2nvw.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <20060917110259.GB1497@diku.dk>

```
Jonas Fonseca <fonseca@diku.dk> writes:

> Copy and pasted from git-pack-objects(1).

I've been fighting the urge to do this myself for a few months
now ;-)

$ git log -S--window -- git-repack.sh
commit ccb365047a1081455b767867f0887e7b4334f9d8
Author: Linus Torvalds <torvalds@osdl.org>
Date:   Wed Apr 19 10:05:12 2006 -0700

    Allow "git repack" users to specify repacking window/depth
    
    .. but don't even bother documenting it. I don't think any normal person
    is supposed to ever really care, but it simplifies testing when you want
    to use the "git repack" wrapper rather than forcing you to use the core
    programs (which already do support the window/depth arguments, of course).

I will take your patch; I think it is useful to document this.
Thanks.

```
