From: "Dana How" <danahow@gmail.com>
To: "Junio C Hamano" <junkio@cox.net>
Cc: git@vger.kernel.org, danahow@gmail.com
Subject: [PATCH 10/13] update delta handling in write_object() for --pack-limit
Date: Thu, 5 Apr 2007 15:38:22 -0700 [thread overview]
Message-ID: <56b7f5510704051538na4393d7k5e51ed2a511cc86e@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 150 bytes --]
---
builtin-pack-objects.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
--
Dana L. How danahow@gmail.com +1 650 804 5991 cell
[-- Attachment #2: 0010-update-delta-handling-in-write_object-for-pack-l.patch.txt --]
[-- Type: text/plain, Size: 1172 bytes --]
From 7ee505accac1675269d1fcfc7a6e3bcf70792a2f Mon Sep 17 00:00:00 2001
From: Dana How <how@deathvalley.cswitch.com>
Date: Thu, 5 Apr 2007 14:11:21 -0700
Subject: [PATCH 10/13] update delta handling in write_object() for --pack-limit
---
builtin-pack-objects.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index ccc2d15..a243eed 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -419,13 +419,17 @@ static off_t write_object(struct sha1file *f,
}
if (!to_reuse) {
+ int usable_delta = !entry->delta ? 0 :
+ !offset_limit ? 1 :
+ entry->delta->no_write ? 0 :
+ entry->delta->offset ? 1 : 0;
buf = read_sha1_file(entry->sha1, &type, &size);
if (!buf)
die("unable to read %s", sha1_to_hex(entry->sha1));
if (size != entry->size)
die("object %s size inconsistency (%lu vs %lu)",
sha1_to_hex(entry->sha1), size, entry->size);
- if (entry->delta) {
+ if (usable_delta) {
buf = delta_against(buf, size, entry);
size = entry->delta_size;
obj_type = (allow_ofs_delta && entry->delta->offset) ?
--
1.5.1.rc2.18.g9c88-dirty
next reply other threads:[~2007-04-05 22:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-05 22:38 Dana How [this message]
2007-04-05 23:18 ` [PATCH 10/13] update delta handling in write_object() for --pack-limit Junio C Hamano
2007-04-05 23:41 ` Dana How
2007-04-06 0:43 ` Nicolas Pitre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56b7f5510704051538na4393d7k5e51ed2a511cc86e@mail.gmail.com \
--to=danahow@gmail.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).