git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/2] pack-objects: document --delta-base-offset option

From
Junio C Hamano <junkio@cox.net>
Date
Oct 13, 2006, 05:35 UTC
Message-ID
<11607177011745-git-send-email-junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
 Documentation/git-pack-objects.txt |   13 ++++++++++++-
 builtin-pack-objects.c             |    2 +-
 2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt
index d4661dd..5788709 100644
--- a/Documentation/git-pack-objects.txt
+++ b/Documentation/git-pack-objects.txt
@@ -9,7 +9,7 @@ git-pack-objects - Create a packed archi
 SYNOPSIS
 --------
 [verse]
-'git-pack-objects' [-q] [--no-reuse-delta] [--non-empty]
+'git-pack-objects' [-q] [--no-reuse-delta] [--delta-base-offset] [--non-empty]
 	[--local] [--incremental] [--window=N] [--depth=N]
 	[--revs [--unpacked | --all]*] [--stdout | base-name] < object-list
 
@@ -110,6 +110,17 @@ base-name::
 	This flag tells the command not to reuse existing deltas
 	but compute them from scratch.
 
+--delta-base-offset::
+	A packed archive can express base object of a delta as
+	either 20-byte object name or as an offset in the
+	stream, but older version of git does not understand the
+	latter.  By default, git-pack-objects only uses the
+	former format for better compatibility.  This option
+	allows the command to use the latter format for
+	compactness.  Depending on the average delta chain
+	length, this option typically shrinks the resulting
+	packfile by 3-5 per-cent.
+
 
 Author
 ------
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index ee5f031..41e1e74 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -15,7 +15,7 @@ #include "list-objects.h"
 #include <sys/time.h>
 #include <signal.h>
 
-static const char pack_usage[] = "git-pack-objects [-q] [--no-reuse-delta] [--non-empty] [--local] [--incremental] [--window=N] [--depth=N] [--revs [--unpacked | --all]*] [--stdout | base-name] <ref-list | <object-list]";
+static const char pack_usage[] = "git-pack-objects [-q] [--no-reuse-delta] [--delta-base-offset] [--non-empty] [--local] [--incremental] [--window=N] [--depth=N] [--revs [--unpacked | --all]*] [--stdout | base-name] <ref-list | <object-list]";
 
 struct object_entry {
 	unsigned char sha1[20];
-- 
1.4.3.rc2.g51ca
Next: Junio C Hamano
Message 1 of 8 in “pack-objects: document --delta-base-offset option”
  1. 1/2 pack-objects: document --delta-base-offset optionJunio C Hamano, Oct 13, 2006
  2. 2/2 git-repack: -b to pass --delta-base-offsetJunio C Hamano, Oct 13, 2006
  3. Nicolas PitreOct 13, 2006
  4. Jakub NarebskiOct 13, 2006
  5. Junio C HamanoOct 13, 2006
  6. Jakub NarebskiOct 13, 2006
  7. Nicolas PitreOct 13, 2006
  8. Junio C HamanoOct 13, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.