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

[PATCH 08/13] prevent try_delta from using objects not in pack

From
DHDana How <danahow@gmail.com>
Date
Apr 5, 2007, 22:35 UTC
Message-ID
<56b7f5510704051535ya98e86eu7f786f118c4fe229@mail.gmail.com>
---
 builtin-pack-objects.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
-- 
Dana L. How  danahow@gmail.com  +1 650 804 5991 cell


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: Junio C Hamano
Message 1 of 8 in “prevent try_delta from using objects not in pack”
  1. 08/13 prevent try_delta from using objects not in packDana How, Apr 5, 2007
  2. Junio C HamanoApr 5, 2007
  3. Nicolas PitreApr 6, 2007
  4. Dana HowApr 6, 2007
  5. Nicolas PitreApr 6, 2007
  6. Dana HowApr 6, 2007
  7. Nicolas PitreApr 6, 2007
  8. Dana HowApr 6, 2007

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.