From: "Dana How" <danahow@gmail.com>
To: "Junio C Hamano" <junkio@cox.net>
Cc: git@vger.kernel.org, danahow@gmail.com
Subject: [PATCH 08/13] prevent try_delta from using objects not in pack
Date: Thu, 5 Apr 2007 15:35:12 -0700 [thread overview]
Message-ID: <56b7f5510704051535ya98e86eu7f786f118c4fe229@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 148 bytes --]
---
builtin-pack-objects.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
--
Dana L. How danahow@gmail.com +1 650 804 5991 cell
[-- Attachment #2: 0008-prevent-try_delta-from-using-objects-not-in-pack.patch.txt --]
[-- Type: text/plain, Size: 857 bytes --]
From 7d510f82b1e6acccc25596052abf3c5f1961ebcc Mon Sep 17 00:00:00 2001
From: Dana How <how@deathvalley.cswitch.com>
Date: Thu, 5 Apr 2007 14:04:59 -0700
Subject: [PATCH 08/13] prevent try_delta from using objects not in pack
---
builtin-pack-objects.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index 9eb5fd6..37b0150 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -1251,6 +1251,10 @@ static int try_delta(struct unpacked *trg, struct unpacked *src,
if (trg_entry->type != src_entry->type)
return -1;
+ /* Don't try deltas involving already/non written objects */
+ if (trg_entry->no_write || src_entry->no_write)
+ return -1;
+
/* We do not compute delta to *create* objects we are not
* going to pack.
*/
--
1.5.1.rc2.18.g9c88-dirty
next reply other threads:[~2007-04-05 22:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-05 22:35 Dana How [this message]
2007-04-05 23:04 ` [PATCH 08/13] prevent try_delta from using objects not in pack Junio C Hamano
2007-04-06 1:02 ` Nicolas Pitre
2007-04-06 2:28 ` Dana How
2007-04-06 3:27 ` Nicolas Pitre
2007-04-06 3:47 ` Dana How
2007-04-06 14:59 ` Nicolas Pitre
2007-04-06 18:17 ` Dana How
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=56b7f5510704051535ya98e86eu7f786f118c4fe229@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).